@pure-ds/core 0.5.59 → 0.5.60
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-manager.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-manager.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-manager.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds-manager.js"],"names":[],"mappings":"AA2uSA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAj0LE;;;WAGG;;;QAgCH;;;;;;WAMG;;;;;QA8EH;;;;WAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAogHH;;;WAGG;;;;;;QAwrBH;;WAEG;;;;;;;;QAoFH;;;;;;WAMG;;;;;;QAsKH;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2+CJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-live.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-live.js"],"names":[],"mappings":"AA6JA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"pds-live.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-live.js"],"names":[],"mappings":"AA6JA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuRC;0BAhbyB,oBAAoB"}
|
package/package.json
CHANGED
package/public/assets/js/app.js
CHANGED
|
@@ -3299,7 +3299,7 @@ ${e}.replaceSync(\`${o}\`);
|
|
|
3299
3299
|
export const ${e}CSS = \`${o}\`;
|
|
3300
3300
|
`}};function Ue(r={},e={}){let t=Number(e.minContrast||4.5),o=n=>{let c=String(n||"").replace("#",""),d=c.length===3?c.split("").map(l=>l+l).join(""):c,p=parseInt(d||"0",16);return{r:p>>16&255,g:p>>8&255,b:p&255}},a=n=>{let{r:c,g:d,b:p}=o(n),l=[c/255,d/255,p/255].map(u=>u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4));return .2126*l[0]+.7152*l[1]+.0722*l[2]},i=(n,c)=>{if(!n||!c)return 0;let d=a(n),p=a(c),l=Math.max(d,p),u=Math.min(d,p);return(l+.05)/(u+.05)},s=[];try{let c=new se({design:structuredClone(r)}).tokens.colors,d={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},p=i(d.primaryFill,"#ffffff");p<t&&s.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${p.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:p,min:t,context:"light/btn-primary"});let l=i(d.surfaceBg,d.surfaceText);l<t&&s.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${l.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:l,min:t,context:"light/surface-text"});let u=i(d.primaryText,d.surfaceBg);u<t&&s.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${u.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:u,min:t,context:"light/outline"});let g=c.dark;if(g){let f={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},y=i(f.primaryFill,"#ffffff");y<t&&s.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${y.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:y,min:t,context:"dark/btn-primary"});let b=i(f.primaryText,f.surfaceBg);b<t&&s.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${b.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:b,min:t,context:"dark/outline"})}}catch(n){s.push({path:"/",message:`Validation failed: ${String(n?.message||n)}`,ratio:0,min:0})}return{ok:s.length===0,issues:s}}function kr(r){let e=r.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let a=document.createElement("canvas").getContext("2d");if(!a)return!1;let i="mmmmmmmmmmlli",s="72px",n="monospace";a.font=`${s} ${n}`;let c=a.measureText(i).width;a.font=`${s} "${e}", ${n}`;let d=a.measureText(i).width;return c!==d}function wo(r){return r?r.split(",").map(o=>o.trim())[0].replace(/['"]/g,"").trim():null}async function xo(r,e={}){if(!r)return Promise.resolve();let{weights:t=[400,500,600,700],italic:o=!1}=e,a=wo(r);if(!a||kr(a))return Promise.resolve();let i=encodeURIComponent(a);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${i}"]`)?(console.log(`Font "${a}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${a}" from Google Fonts...`),new Promise((n,c)=>{let d=document.createElement("link");d.rel="stylesheet";let p=o?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;d.href=`https://fonts.googleapis.com/css2?family=${i}:${p}&display=swap`,d.setAttribute("data-font-loader",a),d.onload=()=>{console.log(`Successfully loaded font "${a}"`),n()},d.onerror=()=>{console.warn(`Failed to load font "${a}" from Google Fonts`),c(new Error(`Failed to load font: ${a}`))},document.head.appendChild(d),setTimeout(()=>{kr(a)||console.warn(`Font "${a}" did not load within timeout`),n()},5e3)}))}async function Sr(r){if(!r)return Promise.resolve();let e=new Set;r.fontFamilyHeadings&&e.add(r.fontFamilyHeadings),r.fontFamilyBody&&e.add(r.fontFamilyBody),r.fontFamilyMono&&e.add(r.fontFamilyMono);let t=Array.from(e).map(o=>xo(o).catch(a=>{console.warn(`Could not load font: ${o}`,a)}));await Promise.all(t)}function $r(r){function e(a,i,s){let n=a[0];if(n==="colors")return i==="scheme"?"string":"color";if(n==="spacing"||n==="radius"||n==="borderWidths")return"dimension";if(n==="typography"){let c=a[1];return c==="fontFamily"?"fontFamily":c==="fontSize"?"fontSize":c==="fontWeight"?"fontWeight":c==="lineHeight"?"lineHeight":"string"}if(n==="shadows")return"shadow";if(n==="layout")return"dimension";if(n==="transitions")return"duration";if(n==="zIndex")return"number";if(n==="icons")return i==="defaultSize"||a.includes("sizes")?"dimension":"string";if(typeof s=="number")return"number";if(typeof s=="string"){if(/^\d+(\.\d+)?ms$/.test(s))return"duration";if(/^\d+(\.\d+)?(px|rem|em|vh|vw|%)$/.test(s))return"dimension";if(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(s)||/^(rgb|rgba|hsl|hsla|oklab|lab)\(/.test(s))return"color"}}function t(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function o(a,i=[]){if(a==null)return a;if(Array.isArray(a))return a.map((d,p)=>o(d,i.concat(String(p))));if(t(a)){if(Object.prototype.hasOwnProperty.call(a,"value")&&(Object.prototype.hasOwnProperty.call(a,"type")||Object.keys(a).length===1))return a;let d={};for(let[p,l]of Object.entries(a))d[p]=o(l,i.concat(p));return d}let s=i[i.length-1]??"",n=e(i,s,a),c=a;if(n==="number"&&typeof c=="string"){let d=Number(c);Number.isNaN(d)||(c=d)}return n?{value:c,type:n}:{value:c}}return o(r,[])}var Cr="pure-ds-config",ko="pds-configurator",$t=null,Ct=null;function So(){return typeof BroadcastChannel>"u"?null:($t||($t=new BroadcastChannel(ko)),Ct||(Ct=`pds-${Math.random().toString(36).slice(2)}`),$t)}customElements.define("pds-config-form",class extends _{#o;#e=0;#r=null;#n=null;#l=500;static properties={config:{type:Object,state:!0},schema:{type:Object,state:!0},mode:{type:String},inspectorMode:{type:Boolean,state:!0},formValues:{type:Object,state:!0},validationIssues:{type:Array,state:!0},formKey:{type:Number,state:!0},showInspector:{type:Boolean,attribute:"show-inspector"},showPresetSelector:{type:Boolean,attribute:"show-preset-selector"},showThemeSelector:{type:Boolean,attribute:"show-theme-selector"}};createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.formKey=0,this._validationToastId=null,this.mode="simple",this.inspectorMode=!1,this.config=this.loadConfig(),this._inspectorDeactivateHandler=()=>{this.inspectorMode&&(this.inspectorMode=!1,this.dispatchInspectorModeChange())},m.addEventListener("pds:inspector:deactivate",this._inspectorDeactivateHandler);try{st(m.theme),nt(m.theme)}catch{}this.updateForm(),this.applyDefaultHostVariables(),this._initialValidationScheduled=!1,this._loadingToastShown=!1}disconnectedCallback(){super.disconnectedCallback(),this._inspectorDeactivateHandler&&(m.removeEventListener("pds:inspector:deactivate",this._inspectorDeactivateHandler),this._inspectorDeactivateHandler=null)}applyDefaultHostVariables(){try{let r=structuredClone(j.default),e=new se({design:r}),t=e.generateSpacingTokens(r.spatialRhythm||{});Object.entries(t).forEach(([s,n])=>{try{this.style.setProperty(`--spacing-${s}`,n)}catch{}});let o=r.spatialRhythm&&r.spatialRhythm.baseUnit||16;this.style.setProperty("--base-unit",`${o}px`);let a=e.generateTypographyTokens(r.typography||{});a.fontSize&&Object.entries(a.fontSize).forEach(([s,n])=>{this.style.setProperty(`--font-size-${s}`,n)});let i=r.typography&&r.typography.baseFontSize||16;this.style.setProperty("--base-font-size",`${i}px`),a.fontFamily&&Object.entries(a.fontFamily).forEach(([s,n])=>{this.style.setProperty(`--font-family-${s}`,n)}),a.lineHeight&&Object.entries(a.lineHeight).forEach(([s,n])=>{this.style.setProperty(`--font-lineHeight-${s}`,n)}),console.debug("pds-config-form: applied default host CSS variables")}catch(r){console.warn("pds-config-form: failed to apply default host variables",r)}}updateForm(){this.schema=null,fetch(`/assets/data/auto-design-${this.mode}.json`).then(r=>r.json()).then(r=>{this.schema=r,this.formValues=this.filterConfigForSchema(this.config),this.formKey=(this.formKey||0)+1}).catch(r=>{console.warn("Failed to load schema:",r)})}_isEqual(r,e){if(r===e)return!0;if(typeof r!=typeof e)return!1;if(r&&e&&typeof r=="object"){if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(let a=0;a<r.length;a++)if(!this._isEqual(r[a],e[a]))return!1;return!0}let t=Object.keys(r),o=Object.keys(e);t.length,o.length;for(let a of new Set([...t,...o]))if(!this._isEqual(r[a],e[a]))return!1;return!0}return!1}_deepDiff(r,e){if(!this._isEqual(r,e)){if(r&&e&&typeof r=="object"&&typeof e=="object"&&!Array.isArray(r)&&!Array.isArray(e)){let t={},o=new Set([...Object.keys(e)]);for(let a of o){let i=this._deepDiff(r[a],e[a]);i!==void 0&&(t[a]=i)}return Object.keys(t).length?t:void 0}return this._isEqual(r,e)?void 0:e}}_resolvePresetBase(r){let e=String(r||"default").toLowerCase(),t=j?.[e]||j?.default;return JSON.parse(JSON.stringify(t||j.default))}loadConfig(){let r=localStorage.getItem(Cr);if(r)try{let e=JSON.parse(r);if(e&&("preset"in e||"design"in e)){let o=e.preset||"default",a=this._resolvePresetBase(o),i=U(a,e.design||{});return this._stored={preset:o,design:e.design||{}},this._legacy=!1,i}let t=U(config.design,e);return this._stored=null,this._legacy=!0,t}catch(e){console.warn("Failed to parse stored config, using defaults",e)}return this._stored={preset:"default",design:{}},this._legacy=!1,JSON.parse(JSON.stringify(this._resolvePresetBase("default")))}saveConfig(){try{let r=this._stored&&this._stored.preset||"default",e=this._resolvePresetBase(r),t=this._deepDiff(e,this.config)||{},o={preset:r,design:t};localStorage.setItem(Cr,JSON.stringify(o)),this._stored=o,this._legacy=!1}catch(r){console.warn("Failed to save config: ",r)}}updated(r){if(r.has("schema")){this.formValues=this.filterConfigForSchema(this.config);let e=this._initialValidationScheduled?50:150;this._initialValidationScheduled=!0,setTimeout(()=>{try{this.applyStyles(!0)}catch(t){console.warn("Delayed applyStyles failed:",t)}},e)}}async applyStyles(r=!1){let e=structuredClone(j.default);if(r&&this.config){let a=this._stored&&this._stored.preset||"default",i=this._resolvePresetBase(a);e=U(i,this.config)}if(e.typography)try{await Sr(e.typography)}catch(a){console.warn("Failed to load some fonts from Google Fonts:",a)}try{let a=Ue(e);if(!a.ok){if(this.validationIssues=a.issues,!this._validationToastId){let i=a.issues.slice(0,3).map(s=>`\u2022 ${s.message}`).join(`
|
|
3301
3301
|
`);this._validationToastId=await m.toast(`Design has accessibility issues. Fix before applying.
|
|
3302
|
-
${i}`,{type:"error",persistent:!0})}return}this.validationIssues=[],this._validationToastId&&(document.querySelector("#global-toaster")?.dismissToast(this._validationToastId),this._validationToastId=null)}catch(a){console.warn("Validation failed unexpectedly:",a)}let t=m.theme||null,o={design:structuredClone(e)};t&&(o.theme=t),this.generator=new se(o),Mt(this.generator);try{st(m.theme),nt(m.theme)}catch{}this.scheduleDesignUpdatedEmit({config:e,designer:this.generator})}scheduleDesignUpdatedEmit(r){let e=Date.now(),t=()=>{this.#e=Date.now(),this.#r&&(clearTimeout(this.#r),this.#r=null),m.dispatchEvent(new CustomEvent("pds:design:updated",{detail:r})),this.broadcastConfiguratorChange(r)};if(e-this.#e>=this.#l){t();return}if(!this.#r){let o=this.#l-(e-this.#e);this.#r=setTimeout(()=>{this.#r=null,t()},o)}}broadcastConfiguratorChange(r){try{let e=So();if(!e)return
|
|
3302
|
+
${i}`,{type:"error",persistent:!0})}return}this.validationIssues=[],this._validationToastId&&(document.querySelector("#global-toaster")?.dismissToast(this._validationToastId),this._validationToastId=null)}catch(a){console.warn("Validation failed unexpectedly:",a)}let t=m.theme||null,o={design:structuredClone(e)};t&&(o.theme=t),this.generator=new se(o),Mt(this.generator);try{st(m.theme),nt(m.theme)}catch{}this.scheduleDesignUpdatedEmit({config:e,designer:this.generator})}scheduleDesignUpdatedEmit(r){let e=Date.now(),t=()=>{this.#e=Date.now(),this.#r&&(clearTimeout(this.#r),this.#r=null),m.dispatchEvent(new CustomEvent("pds:design:updated",{detail:r})),this.broadcastConfiguratorChange(r)};if(e-this.#e>=this.#l){t();return}if(!this.#r){let o=this.#l-(e-this.#e);this.#r=setTimeout(()=>{this.#r=null,t()},o)}}broadcastConfiguratorChange(r){try{let e=So();if(!e){console.warn("[PDS Configurator] BroadcastChannel unavailable; change not broadcast.");return}console.log("[PDS Configurator] Broadcasting design update."),e.postMessage({type:"pds:configurator:design",sourceId:Ct,timestamp:Date.now(),payload:{config:r?.config||null,theme:m.theme||null}})}catch(e){console.warn("Failed to broadcast configurator change:",e)}}async toggleInspectorMode(){this.inspectorMode=!this.inspectorMode,this.dispatchInspectorModeChange(),await m.toast(this.inspectorMode?"Code Inspector active - click any element in the showcase to view its code":"Code Inspector deactivated",{type:"info",duration:3e3})}dispatchInspectorModeChange(){m.dispatchEvent(new CustomEvent("pds:inspector:mode:changed",{detail:{active:this.inspectorMode}}))}flattenConfig(r,e=""){let t={};for(let[o,a]of Object.entries(r)){let i=e?`${e}/${o}`:`/${o}`;a&&typeof a=="object"&&!Array.isArray(a)?Object.assign(t,this.flattenConfig(a,i)):t[i]=a}return t}getSchemaProperties(r,e=""){let t=new Set;if(!r||!r.properties)return t;for(let[o,a]of Object.entries(r.properties)){let i=e?`${e}/${o}`:`/${o}`;t.add(i),a.type==="object"&&a.properties&&this.getSchemaProperties(a,i).forEach(n=>t.add(n))}return t}filterConfigForSchema(r){if(!r)return{};if(!this.schema)return this.flattenConfig(r);let e=this.getSchemaProperties(this.schema),t=this.flattenConfig(r),o={};for(let[a,i]of Object.entries(t))e.has(a)&&i!==null&&i!==void 0&&(o[a]=i);return o}handleFormChange=async r=>{let e,t=null;if(r.type==="pw:value-change"&&r.detail&&(t=r.detail.name),r.detail&&r.detail.json)e=r.detail.json;else{let n=r.currentTarget?.tagName?.toUpperCase()==="pds-form"?r.currentTarget:this.querySelector("pds-form");if(n)e=n.getValuesFlat?.()||n.values||{};else{console.warn("No form element found in form change event",r);return}}console.log("Form values received:",e);let o={},a=n=>n.replace(/~1/g,"/").replace(/~0/g,"~");for(let[n,c]of Object.entries(e))if(n)if(n.startsWith("/")){let p=n.replace(/^\//,"").split("/").map(a),l=o;for(let u=0;u<p.length-1;u++){let g=p[u];(!l[g]||typeof l[g]!="object")&&(l[g]={}),l=l[g]}l[p[p.length-1]]=c}else if(n.includes(".")){let d=n.split("."),p=o;for(let l=0;l<d.length-1;l++)(!p[d[l]]||typeof p[d[l]]!="object")&&(p[d[l]]={}),p=p[d[l]];p[d[d.length-1]]=c}else o[n]=c;console.log("Nested values:",o);let i=U(structuredClone(this.config),o),s=Ue(i);if(!s.ok){if(this.validationIssues=s.issues,!this._validationToastId){let n=s.issues.slice(0,3).map(c=>`\u2022 ${c.message}`).join(`
|
|
3303
3303
|
`);this._validationToastId=await m.toast(`Design has accessibility issues. Fix before saving.
|
|
3304
3304
|
${n}`,{type:"error"})}return}this.validationIssues=[];try{this._validationToastId&&(document.querySelector("#global-toaster")?.dismissToast(this._validationToastId),this._validationToastId=null)}catch{}this.config=i,console.log("Updated (persisted) config (not applied):",this.config),this.saveConfig(),t&&(console.log("\u{1F514} Emitting design-field-changed event for field:",t),m.dispatchEvent(new CustomEvent("pds:design:field:changed",{detail:{field:t,config:this.config}})));try{this.#n&&(clearTimeout(this.#n),this.#n=null),this.#n=setTimeout(()=>{this.#n=null,this.applyStyles(!0)},this.#l)}catch(n){console.warn("Failed to schedule applyStyles with user config:",n)}};handleReset=async()=>{if(await m.ask("Reset to default configuration? This will clear your saved settings.")){this._stored={preset:"default",design:{}};let e=this._resolvePresetBase("default");this.config=JSON.parse(JSON.stringify(e)),this.formValues=this.filterConfigForSchema(this.config),this.formKey=(this.formKey||0)+1,this.saveConfig(),this.applyStyles(!0),await m.toast("Configuration reset to defaults",{type:"info",duration:2e3})}};applyPreset=async r=>{if(await m.ask(`Load "${r.name}" preset? This will replace your current settings.`)){let t=JSON.parse(JSON.stringify(r)),o=Ue(t);if(!o.ok){if(this.validationIssues=o.issues,!this._validationToastId){let a=o.issues.slice(0,3).map(i=>`\u2022 ${i.message}`).join(`
|
|
3305
3305
|
`);this._validationToastId=await m.toast(`Preset "${r.name}" has accessibility issues \u2014 not applied.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Be=Object.defineProperty;var O=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)Be(n,e,{get:t[e],enumerable:!0})};var le={};P(le,{enums:()=>g});var g,_=O(()=>{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 ue={};P(ue,{default:()=>Ie,findComponentForElement:()=>je,getAllSelectors:()=>Ne,getAllTags:()=>Pe,getByCategory:()=>Oe,ontology:()=>F,searchOntology:()=>De});function B(n,t){if(!n||!t)return!1;try{return n.matches(t)}catch{return!1}}function pe(n,t){if(!n||!t||!n.closest)return null;try{return n.closest(t)}catch{return null}}function je(n,{maxDepth:t=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let e=n,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 a of PDS.ontology.enhancements){let i=a.selector||a;if(B(e,i))return{element:e,componentType:"enhanced-component",displayName:a.description||i,id:a.id}}if(e.tagName==="FIELDSET"){let a=e.getAttribute("role");if(a==="group"||a==="radiogroup")return{element:e,componentType:"form-group",displayName:a==="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 a of PDS.ontology.primitives){for(let i of a.selectors||[]){let c=String(i||"").trim();if(c.includes("*")){if(c.startsWith(".")){let d=c.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(p=>p.startsWith(d)))return{element:e,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let u=e.parentElement,l=0;for(;u&&l<t;){if(u.classList&&Array.from(u.classList).some(p=>p.startsWith(d))&&u.tagName!=="DS-SHOWCASE")return{element:u,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};u=u.parentElement,l++}continue}continue}if(B(e,c))return{element:e,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let s=pe(e,c);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags}}if(e.classList){let i=Array.from(e.classList);for(let c of a.selectors||[])if(typeof c=="string"&&c.includes("*")&&c.startsWith(".")){let s=c.slice(1).replace(/\*/g,"");if(i.some(d=>d.startsWith(s)))return{element:e,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags}}}}for(let a of PDS.ontology.layoutPatterns||[])for(let i of a.selectors||[]){let c=String(i||"").trim();if(c.includes("*")){if(c.startsWith(".")){let d=c.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(u=>u.startsWith(d)))return{element:e,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags}}continue}if(B(e,c))return{element:e,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags};let s=pe(e,c);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags}}if(e.tagName&&e.tagName.includes("-")){let a=e.tagName.toLowerCase(),i=PDS.ontology.components.find(c=>c.selectors.includes(a));return{element:e,componentType:"web-component",displayName:i?.name||a,id:i?.id||a,tags:i?.tags}}if(e.tagName==="BUTTON"){let a=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:a?"button with icon":"button",id:"button"}}if(B(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let a=B(e,"pds-icon")?e:e.closest("pds-icon");return{element:a,componentType:"icon",displayName:`pds-icon (${a.getAttribute&&a.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(B(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:B(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function Ne(){let n=[];for(let t of PDS.ontology.primitives)n.push(...t.selectors||[]);for(let t of PDS.ontology.components)n.push(...t.selectors||[]);for(let t of PDS.ontology.layoutPatterns||[])n.push(...t.selectors||[]);return Array.from(new Set(n))}function De(n,t={}){let e=n.toLowerCase(),r=[],o=(a,i)=>{for(let c of a)(c.id?.toLowerCase().includes(e)||c.name?.toLowerCase().includes(e)||c.description?.toLowerCase().includes(e)||c.tags?.some(d=>d.toLowerCase().includes(e))||c.category?.toLowerCase().includes(e)||c.selectors?.some(d=>d.toLowerCase().includes(e)))&&r.push({...c,type:i})};return(!t.type||t.type==="primitive")&&o(F.primitives,"primitive"),(!t.type||t.type==="component")&&o(F.components,"component"),(!t.type||t.type==="layout")&&o(F.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&o(F.enhancements,"enhancement"),r}function Oe(n){let t=n.toLowerCase();return{primitives:F.primitives.filter(e=>e.category===t),components:F.components.filter(e=>e.category===t),layouts:F.layoutPatterns.filter(e=>e.category===t)}}function Pe(){let n=new Set;return F.primitives.forEach(t=>t.tags?.forEach(e=>n.add(e))),F.components.forEach(t=>t.tags?.forEach(e=>n.add(e))),F.layoutPatterns.forEach(t=>t.tags?.forEach(e=>n.add(e))),F.enhancements.forEach(t=>t.tags?.forEach(e=>n.add(e))),Array.from(n).sort()}var F,Ie,J=O(()=>{F={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-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"]}};Ie=F});var we={};P(we,{AutoDefiner:()=>te});async function it(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:r,mapper:o=d=>`${d}.js`,onError:a=(d,u)=>console.error(`[defineWebComponents] ${d}:`,u)}=t,i=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(u,l,p)=>p.toUpperCase()),s=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let u=o(d),p=await import(u instanceof URL?u.href:new URL(u,i).href),h=p?.default??p?.[c(d)];if(!h){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${c(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,h),{tag:d,status:"defined"})}catch(u){throw a(d,u),u}};return Promise.all(e.map(s))}var te,ke=O(()=>{te=class{constructor(t={}){let{baseURL:e,mapper:r,onError:o,predicate:a=()=>!0,attributeModule:i="data-module",root:c=document,scanExisting:s=!0,debounceMs:d=16,observeShadows:u=!0,enhancers:l=[],patchAttachShadow:p=!0}=t,h=new Set,m=new Set,y=new Set,f=new Map,w=new WeakMap,$=new WeakMap,z=0,T=!1,R=null,j=b=>{if(!b||!l.length)return;let x=$.get(b);x||(x=new Set,$.set(b,x));for(let v of l)if(!(!v.selector||!v.run)&&!x.has(v.selector))try{b.matches&&b.matches(v.selector)&&(v.run(b),x.add(v.selector))}catch(L){console.warn(`[AutoDefiner] Error applying enhancer for selector "${v.selector}":`,L)}},W=(b,x)=>{if(!T&&!(!b||!b.includes("-"))&&!customElements.get(b)&&!m.has(b)&&!y.has(b)){if(x&&x.getAttribute){let v=x.getAttribute(i);v&&!f.has(b)&&f.set(b,v)}h.add(b),G()}},G=()=>{z||(z=setTimeout(S,d))},k=b=>{if(b){if(b.nodeType===1){let x=b,v=x.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,x)&&W(v,x),j(x),u&&x.shadowRoot&&M(x.shadowRoot)}b.querySelectorAll&&b.querySelectorAll("*").forEach(x=>{let v=x.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,x)&&W(v,x),j(x),u&&x.shadowRoot&&M(x.shadowRoot)})}},M=b=>{if(!b||w.has(b))return;k(b);let x=new MutationObserver(v=>{for(let L of v)L.addedNodes?.forEach(N=>{k(N)}),L.type==="attributes"&&L.target&&k(L.target)});x.observe(b,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),w.set(b,x)};async function S(){if(clearTimeout(z),z=0,!h.size)return;let b=Array.from(h);h.clear(),b.forEach(x=>m.add(x));try{let x=v=>f.get(v)??(r?r(v):`${v}.js`);await it(...b,{baseURL:e,mapper:x,onError:(v,L)=>{y.add(v),o?.(v,L)}})}catch{}finally{b.forEach(x=>m.delete(x))}}let E=c===document?document.documentElement:c,A=new MutationObserver(b=>{for(let x of b)x.addedNodes?.forEach(v=>{k(v)}),x.type==="attributes"&&x.target&&k(x.target)});if(A.observe(E,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),u&&p&&Element.prototype.attachShadow){let b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(v){let L=b.call(this,v);if(v&&v.mode==="open"){M(L);let N=this.tagName?.toLowerCase();N&&N.includes("-")&&!customElements.get(N)&&W(N,this)}return L},R=()=>Element.prototype.attachShadow=b}return s&&k(E),{stop(){T=!0,A.disconnect(),R&&R(),z&&(clearTimeout(z),z=0),w.forEach(b=>b.disconnect())},flush:S}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let r=t,{baseURL:o,mapper:a=u=>`${u}.js`,onError:i=(u,l)=>console.error(`[defineWebComponents] ${u}:`,l)}=e,c=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=u=>u.toLowerCase().replace(/(^|-)([a-z])/g,(l,p,h)=>h.toUpperCase()),d=async u=>{try{if(customElements.get(u))return{tag:u,status:"already-defined"};let l=a(u),h=await import(l instanceof URL?l.href:new URL(l,c).href),m=h?.default??h?.[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(l){throw i(u,l),l}};return Promise.all(r.map(d))}}});var ne={};P(ne,{PDSQuery:()=>oe});var oe,ie=O(()=>{oe=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),a=[];o.intents.has("color")&&a.push(...this.queryColors(o,e)),(o.intents.has("utility")||o.intents.has("border")||o.intents.has("layout")||e.includes("class"))&&a.push(...this.queryUtilities(o,e)),(o.intents.has("component")||o.entities.size>0)&&a.push(...this.queryComponents(o,e)),(o.intents.has("layout")||o.intents.has("pattern"))&&a.push(...this.queryPatterns(o,e)),o.intents.has("typography")&&a.push(...this.queryTypography(o,e)),o.intents.has("spacing")&&a.push(...this.querySpacing(o,e));let i=new Map;for(let c of a){let s=c.value;(!i.has(s)||i.get(s).score<c.score)&&i.set(s,c)}return Array.from(i.values()).sort((c,s)=>s.score-c.score).slice(0,10)}tokenize(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,a]of Object.entries(this.intents))a.some(i=>t.includes(i)||e.includes(i))&&r.intents.add(o);for(let[o,a]of Object.entries(this.entities))a.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 a=o.tokens.colors,i=Array.from(t.entities),c=Array.from(t.modifiers);if(c.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 s=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let d of[500,600,700]){let u=`--color-${s}-${d}`;r.push({text:`${s.charAt(0).toUpperCase()+s.slice(1)} ${d}: var(${u})`,value:u,icon:"palette",category:"Color Scale",score:80-(d-500)/100,cssVar:`var(${u})`,description:`${s} color scale shade ${d}`})}}if(i.includes("button")&&t.intents.has("color")){let s=c[0];s?r.push({text:`Button ${s} fill: var(--primary-fill-${s})`,value:`--primary-fill-${s}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${s} state`}):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 a=o.utilities,i=[];for(let c of Object.values(a))if(typeof c=="object")for(let s of Object.values(c))Array.isArray(s)&&i.push(...s);return t.intents.has("border")&&i.filter(s=>s.includes("border")||s.includes("outline")).forEach(s=>{let d=80;e.includes("gradient")&&s.includes("gradient")&&(d=95),e.includes("glow")&&s.includes("glow")&&(d=95),r.push({text:`${s} - Border utility class`,value:s,icon:"code",category:"Utility Class",score:d,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),t.intents.has("layout")&&i.filter(s=>s.includes("flex")||s.includes("grid")||s.includes("items-")||s.includes("justify-")||s.includes("gap-")).forEach(s=>{r.push({text:`${s} - Layout utility`,value:s,icon:"layout",category:"Utility Class",score:85,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),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 Be=Object.defineProperty;var O=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)Be(n,e,{get:t[e],enumerable:!0})};var le={};P(le,{enums:()=>g});var g,_=O(()=>{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 ue={};P(ue,{default:()=>Ie,findComponentForElement:()=>je,getAllSelectors:()=>De,getAllTags:()=>Pe,getByCategory:()=>Oe,ontology:()=>F,searchOntology:()=>Ne});function B(n,t){if(!n||!t)return!1;try{return n.matches(t)}catch{return!1}}function pe(n,t){if(!n||!t||!n.closest)return null;try{return n.closest(t)}catch{return null}}function je(n,{maxDepth:t=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let e=n,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 a of PDS.ontology.enhancements){let i=a.selector||a;if(B(e,i))return{element:e,componentType:"enhanced-component",displayName:a.description||i,id:a.id}}if(e.tagName==="FIELDSET"){let a=e.getAttribute("role");if(a==="group"||a==="radiogroup")return{element:e,componentType:"form-group",displayName:a==="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 a of PDS.ontology.primitives){for(let i of a.selectors||[]){let c=String(i||"").trim();if(c.includes("*")){if(c.startsWith(".")){let d=c.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(p=>p.startsWith(d)))return{element:e,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let u=e.parentElement,l=0;for(;u&&l<t;){if(u.classList&&Array.from(u.classList).some(p=>p.startsWith(d))&&u.tagName!=="DS-SHOWCASE")return{element:u,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};u=u.parentElement,l++}continue}continue}if(B(e,c))return{element:e,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let s=pe(e,c);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags}}if(e.classList){let i=Array.from(e.classList);for(let c of a.selectors||[])if(typeof c=="string"&&c.includes("*")&&c.startsWith(".")){let s=c.slice(1).replace(/\*/g,"");if(i.some(d=>d.startsWith(s)))return{element:e,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags}}}}for(let a of PDS.ontology.layoutPatterns||[])for(let i of a.selectors||[]){let c=String(i||"").trim();if(c.includes("*")){if(c.startsWith(".")){let d=c.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(u=>u.startsWith(d)))return{element:e,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags}}continue}if(B(e,c))return{element:e,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags};let s=pe(e,c);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags}}if(e.tagName&&e.tagName.includes("-")){let a=e.tagName.toLowerCase(),i=PDS.ontology.components.find(c=>c.selectors.includes(a));return{element:e,componentType:"web-component",displayName:i?.name||a,id:i?.id||a,tags:i?.tags}}if(e.tagName==="BUTTON"){let a=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:a?"button with icon":"button",id:"button"}}if(B(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let a=B(e,"pds-icon")?e:e.closest("pds-icon");return{element:a,componentType:"icon",displayName:`pds-icon (${a.getAttribute&&a.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(B(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:B(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function De(){let n=[];for(let t of PDS.ontology.primitives)n.push(...t.selectors||[]);for(let t of PDS.ontology.components)n.push(...t.selectors||[]);for(let t of PDS.ontology.layoutPatterns||[])n.push(...t.selectors||[]);return Array.from(new Set(n))}function Ne(n,t={}){let e=n.toLowerCase(),r=[],o=(a,i)=>{for(let c of a)(c.id?.toLowerCase().includes(e)||c.name?.toLowerCase().includes(e)||c.description?.toLowerCase().includes(e)||c.tags?.some(d=>d.toLowerCase().includes(e))||c.category?.toLowerCase().includes(e)||c.selectors?.some(d=>d.toLowerCase().includes(e)))&&r.push({...c,type:i})};return(!t.type||t.type==="primitive")&&o(F.primitives,"primitive"),(!t.type||t.type==="component")&&o(F.components,"component"),(!t.type||t.type==="layout")&&o(F.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&o(F.enhancements,"enhancement"),r}function Oe(n){let t=n.toLowerCase();return{primitives:F.primitives.filter(e=>e.category===t),components:F.components.filter(e=>e.category===t),layouts:F.layoutPatterns.filter(e=>e.category===t)}}function Pe(){let n=new Set;return F.primitives.forEach(t=>t.tags?.forEach(e=>n.add(e))),F.components.forEach(t=>t.tags?.forEach(e=>n.add(e))),F.layoutPatterns.forEach(t=>t.tags?.forEach(e=>n.add(e))),F.enhancements.forEach(t=>t.tags?.forEach(e=>n.add(e))),Array.from(n).sort()}var F,Ie,J=O(()=>{F={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-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"]}};Ie=F});var we={};P(we,{AutoDefiner:()=>te});async function it(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:r,mapper:o=d=>`${d}.js`,onError:a=(d,u)=>console.error(`[defineWebComponents] ${d}:`,u)}=t,i=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(u,l,p)=>p.toUpperCase()),s=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let u=o(d),p=await import(u instanceof URL?u.href:new URL(u,i).href),h=p?.default??p?.[c(d)];if(!h){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${c(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,h),{tag:d,status:"defined"})}catch(u){throw a(d,u),u}};return Promise.all(e.map(s))}var te,ke=O(()=>{te=class{constructor(t={}){let{baseURL:e,mapper:r,onError:o,predicate:a=()=>!0,attributeModule:i="data-module",root:c=document,scanExisting:s=!0,debounceMs:d=16,observeShadows:u=!0,enhancers:l=[],patchAttachShadow:p=!0}=t,h=new Set,m=new Set,y=new Set,f=new Map,w=new WeakMap,$=new WeakMap,z=0,T=!1,R=null,j=b=>{if(!b||!l.length)return;let x=$.get(b);x||(x=new Set,$.set(b,x));for(let v of l)if(!(!v.selector||!v.run)&&!x.has(v.selector))try{b.matches&&b.matches(v.selector)&&(v.run(b),x.add(v.selector))}catch(L){console.warn(`[AutoDefiner] Error applying enhancer for selector "${v.selector}":`,L)}},W=(b,x)=>{if(!T&&!(!b||!b.includes("-"))&&!customElements.get(b)&&!m.has(b)&&!y.has(b)){if(x&&x.getAttribute){let v=x.getAttribute(i);v&&!f.has(b)&&f.set(b,v)}h.add(b),G()}},G=()=>{z||(z=setTimeout(S,d))},k=b=>{if(b){if(b.nodeType===1){let x=b,v=x.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,x)&&W(v,x),j(x),u&&x.shadowRoot&&M(x.shadowRoot)}b.querySelectorAll&&b.querySelectorAll("*").forEach(x=>{let v=x.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,x)&&W(v,x),j(x),u&&x.shadowRoot&&M(x.shadowRoot)})}},M=b=>{if(!b||w.has(b))return;k(b);let x=new MutationObserver(v=>{for(let L of v)L.addedNodes?.forEach(D=>{k(D)}),L.type==="attributes"&&L.target&&k(L.target)});x.observe(b,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),w.set(b,x)};async function S(){if(clearTimeout(z),z=0,!h.size)return;let b=Array.from(h);h.clear(),b.forEach(x=>m.add(x));try{let x=v=>f.get(v)??(r?r(v):`${v}.js`);await it(...b,{baseURL:e,mapper:x,onError:(v,L)=>{y.add(v),o?.(v,L)}})}catch{}finally{b.forEach(x=>m.delete(x))}}let E=c===document?document.documentElement:c,A=new MutationObserver(b=>{for(let x of b)x.addedNodes?.forEach(v=>{k(v)}),x.type==="attributes"&&x.target&&k(x.target)});if(A.observe(E,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),u&&p&&Element.prototype.attachShadow){let b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(v){let L=b.call(this,v);if(v&&v.mode==="open"){M(L);let D=this.tagName?.toLowerCase();D&&D.includes("-")&&!customElements.get(D)&&W(D,this)}return L},R=()=>Element.prototype.attachShadow=b}return s&&k(E),{stop(){T=!0,A.disconnect(),R&&R(),z&&(clearTimeout(z),z=0),w.forEach(b=>b.disconnect())},flush:S}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let r=t,{baseURL:o,mapper:a=u=>`${u}.js`,onError:i=(u,l)=>console.error(`[defineWebComponents] ${u}:`,l)}=e,c=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=u=>u.toLowerCase().replace(/(^|-)([a-z])/g,(l,p,h)=>h.toUpperCase()),d=async u=>{try{if(customElements.get(u))return{tag:u,status:"already-defined"};let l=a(u),h=await import(l instanceof URL?l.href:new URL(l,c).href),m=h?.default??h?.[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(l){throw i(u,l),l}};return Promise.all(r.map(d))}}});var ne={};P(ne,{PDSQuery:()=>oe});var oe,ie=O(()=>{oe=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),a=[];o.intents.has("color")&&a.push(...this.queryColors(o,e)),(o.intents.has("utility")||o.intents.has("border")||o.intents.has("layout")||e.includes("class"))&&a.push(...this.queryUtilities(o,e)),(o.intents.has("component")||o.entities.size>0)&&a.push(...this.queryComponents(o,e)),(o.intents.has("layout")||o.intents.has("pattern"))&&a.push(...this.queryPatterns(o,e)),o.intents.has("typography")&&a.push(...this.queryTypography(o,e)),o.intents.has("spacing")&&a.push(...this.querySpacing(o,e));let i=new Map;for(let c of a){let s=c.value;(!i.has(s)||i.get(s).score<c.score)&&i.set(s,c)}return Array.from(i.values()).sort((c,s)=>s.score-c.score).slice(0,10)}tokenize(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,a]of Object.entries(this.intents))a.some(i=>t.includes(i)||e.includes(i))&&r.intents.add(o);for(let[o,a]of Object.entries(this.entities))a.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 a=o.tokens.colors,i=Array.from(t.entities),c=Array.from(t.modifiers);if(c.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 s=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let d of[500,600,700]){let u=`--color-${s}-${d}`;r.push({text:`${s.charAt(0).toUpperCase()+s.slice(1)} ${d}: var(${u})`,value:u,icon:"palette",category:"Color Scale",score:80-(d-500)/100,cssVar:`var(${u})`,description:`${s} color scale shade ${d}`})}}if(i.includes("button")&&t.intents.has("color")){let s=c[0];s?r.push({text:`Button ${s} fill: var(--primary-fill-${s})`,value:`--primary-fill-${s}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${s} state`}):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 a=o.utilities,i=[];for(let c of Object.values(a))if(typeof c=="object")for(let s of Object.values(c))Array.isArray(s)&&i.push(...s);return t.intents.has("border")&&i.filter(s=>s.includes("border")||s.includes("outline")).forEach(s=>{let d=80;e.includes("gradient")&&s.includes("gradient")&&(d=95),e.includes("glow")&&s.includes("glow")&&(d=95),r.push({text:`${s} - Border utility class`,value:s,icon:"code",category:"Utility Class",score:d,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),t.intents.has("layout")&&i.filter(s=>s.includes("flex")||s.includes("grid")||s.includes("items-")||s.includes("justify-")||s.includes("gap-")).forEach(s=>{r.push({text:`${s} - Layout utility`,value:s,icon:"layout",category:"Utility Class",score:85,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),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
4
|
</div>`,description:"Container for grouped buttons with connected styling"}),r}queryComponents(t,e){let r=[],o=this.pds.ontology;return!o?.components&&!o?.primitives||(o.components&&o.components.forEach(a=>{let i=this.scoreMatch(e,a.name+" "+a.id);i>50&&r.push({text:`<${a.id}> - ${a.name}`,value:a.id,icon:"brackets-curly",category:"Web Component",score:i,code:`<${a.id}></${a.id}>`,description:a.description||`${a.name} web component`})}),o.primitives&&o.primitives.forEach(a=>{let i=this.scoreMatch(e,a.name+" "+a.id);if(i>50){let c=a.selectors?.[0]||a.id;r.push({text:`${c} - ${a.name}`,value:a.id,icon:"tag",category:"Primitive",score:i-5,code:this.generatePrimitiveExample(a),description:a.description||`${a.name} primitive element`})}}),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">
|
|
@@ -16,7 +16,7 @@ var Be=Object.defineProperty;var O=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{fo
|
|
|
16
16
|
</section>`,description:"Semantic section element for content grouping"}))),r}queryTypography(t,e){let r=[],o=this.pds.compiled;if(!o?.tokens?.typography)return r;let a=o.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=[],o=this.pds.compiled;if(!o?.tokens?.spacing)return r;let a=o.tokens.spacing;for(let[i,c]of Object.entries(a))["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: ${c}`});return r}scoreMatch(t,e){let r=t.toLowerCase(),o=e.toLowerCase(),a=0;if(r===o)return 100;o.includes(r)&&(a+=80);let i=this.tokenize(r),c=this.tokenize(o),s=i.filter(d=>c.includes(d)).length;return a+=s/i.length*40,o.startsWith(r)&&(a+=20),Math.min(100,a)}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 Te={};P(Te,{deepMerge:()=>Le,fragmentFromTemplateLike:()=>ct,isObject:()=>Z,parseHTML:()=>lt});function Z(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Le(n,t){let e={...n};return Z(n)&&Z(t)&&Object.keys(t).forEach(r=>{Z(t[r])?r in n?e[r]=Le(n[r],t[r]):Object.assign(e,{[r]:t[r]}):Object.assign(e,{[r]:t[r]})}),e}function ct(n){let t=Array.isArray(n?.strings)?n.strings:[],e=Array.isArray(n?.values)?n.values:[],r=new Set,o=[],a=/(\s)(\.[\w-]+)=\s*$/;for(let l=0;l<t.length;l+=1){let p=t[l]??"",h=p.match(a);if(h&&l<e.length){let y=h[2].slice(1),f=`pds-val-${l}`;p=p.replace(a,`$1data-pds-prop="${y}:${f}"`),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 c=(l,p)=>{let h=l.parentNode;if(!h)return;if(p==null){h.removeChild(l);return}let m=y=>{if(y!=null){if(y instanceof Node){h.insertBefore(y,l);return}if(Array.isArray(y)){y.forEach(f=>m(f));return}h.insertBefore(document.createTextNode(String(y)),l)}};m(p),h.removeChild(l)},s=document.createTreeWalker(i.content,NodeFilter.SHOW_COMMENT),d=[];for(;s.nextNode();){let l=s.currentNode;l?.nodeValue?.startsWith("pds-val-")&&d.push(l)}return d.forEach(l=>{let p=Number(l.nodeValue.replace("pds-val-",""));c(l,e[p])}),i.content.querySelectorAll("*").forEach(l=>{let p=l.getAttribute("data-pds-prop");if(!p)return;let[h,m]=p.split(":"),y=Number(String(m).replace("pds-val-",""));h&&Number.isInteger(y)&&(l[h]=e[y]),l.removeAttribute("data-pds-prop")}),i.content}function lt(n){return new DOMParser().parseFromString(n,"text/html").body.childNodes}var Ae=O(()=>{});_();var I={"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"],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",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:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize: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}}};I.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 de(n="log",t,...e){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let o=console[n]||console.log;e.length>0?o(t,...e):o(t)}}_();J();var C=class n{static#g;static get instance(){return this.#g}#e;#o;constructor(t={}){this.options={debug:!1,...t},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),n.#g=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#ke(),typeof CSSStyleSheet<"u"?this.#Fe():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.#m(r,e.light),a=this.#$(o),i=e.dark!=null?this.#$(this.#m(r,e.dark)):null;return{colors:this.#F(t.colors||{},e),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#D(t.shape||{}),borderWidths:this.#O(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:a,darkShadows:i,layout:this.#P(t.layout||{}),transitions:this.#I(t.behavior||{}),zIndex:this.#U(t.layers||{}),icons:this.#H(t.icons||{})}}#M(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)}#m(t={},e){let r={...t};return e!=null&&(r.baseShadowOpacity=e),r}#F(t,e={}){let{primary:r="#3b82f6",secondary:o="#64748b",accent:a="#ec4899",background:i="#ffffff",success:c=null,warning:s="#FFBF00",danger:d=null,info:u=null,darkMode:l={}}=t,p={primary:this.#r(r),secondary:this.#r(o),accent:this.#r(a),success:this.#r(c||this.#E(r)),warning:this.#r(s||a),danger:this.#r(d||this.#C(r)),info:this.#r(u||r),gray:this.#f(o),surface:this.#b(i)};return p.surface.fieldset=this.#L(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.#j(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))}}#E(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%);"}}#L(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#T(t.sunken,.05),overlay:t.elevated}}#T(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),a=this.#b(o),i=r.primary?this.#r(r.primary):this.#i(t.primary);return{surface:{...a,fieldset:this.#B(a)},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(a=>a+a).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),a=[e/255,r/255,o/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*a[0]+.7152*a[1]+.0722*a[2]}#d(t,e){let r=this.#p(t),o=this.#p(e),a=Math.max(r,o),i=Math.min(r,o);return(a+.05)/(i+.05)}#v(t,e=4.5){if(!t)return"#000000";let r="#ffffff",o="#000000",a=this.#d(t,r);if(a>=e)return r;let i=this.#d(t,o);return i>=e||i>a?o:r}#x(t,e=1){let{r,g:o,b:a}=this.#l(t);return`rgba(${r}, ${o}, ${a}, ${e})`}#R(t,e,r=.5){let o=this.#l(t),a=this.#l(e),i=Math.round(o.r+(a.r-o.r)*r),c=Math.round(o.g+(a.g-o.g)*r),s=Math.round(o.b+(a.b-o.b)*r);return this.#W(i,c,s)}#W(t,e,r){let o=a=>{let i=Math.max(0,Math.min(255,Math.round(a))).toString(16);return i.length===1?"0"+i:i};return`#${o(t)}${o(e)}${o(r)}`}#B(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#S(t.elevated,.08),sunken:t.elevated,overlay:this.#S(t.overlay,.05)}}#j(t={},e="#000000",r=4.5){let o=["600","700","800","500","400","900","300","200"],a={shade:null,color:null,ratio:0};for(let i of o){let c=t?.[i];if(!c||typeof c!="string")continue;let s=this.#d(c,e);if(s>a.ratio&&(a={shade:i,color:c,ratio:s}),s>=r)return c}return a.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 a of r){let i=t?.[a];if(!i||typeof i!="string")continue;let c=this.#d(i,"#ffffff");if(c>o.ratio&&(o={shade:a,color:i,ratio:c}),c>=e)return i}return o.color||t?.["600"]||t?.["500"]}#k(t,e={}){let r={},o=e.light??.1,a=e.dark??.25;return Object.entries(t).forEach(([i,c])=>{if(!c||typeof c!="string"||!c.startsWith("#"))return;let s=this.#p(c)<.5,d=this.#v(c,4.5),u=this.#v(c,3),l=this.#R(d,c,.4),p=d,h=l,m=s?"#ffffff":"#000000",y=s?a:o,f=this.#x(m,y),w=s?"#ffffff":"#000000",$=s?.15:.1,z=this.#x(w,$);r[i]={bg:c,text:d,textSecondary:u,textMuted:l,icon:p,iconSubtle:h,shadow:f,border:z,scheme:s?"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,a])=>{let i=t[a.source];e[o]=this.#N(i,a.dimFactor)}),e}#N(t,e=.8){let r=this.#n(t),o=Math.max(r.s*e,5),a=Math.max(r.l*e,5);return this.#t(r.h,o,a)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:r=1.25,maxSpacingSteps:o=12}=t,a=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(o))?Number(o):12,12),c={0:"0"};for(let s=1;s<=i;s++)c[s]=`${a*s}px`;return c}#D(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 a=Number.isFinite(Number(o))?Number(o):g.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(a*.25)?Math.round(a*.25):0}px`,sm:`${Number.isFinite(a*.5)?Math.round(a*.5):0}px`,md:`${a}px`,lg:`${Number.isFinite(a*1.5)?Math.round(a*1.5):0}px`,xl:`${Number.isFinite(a*2)?Math.round(a*2):0}px`,full:"9999px"}}#O(t){let{borderWidth:e="medium"}=t,r;return typeof e=="number"?r=e:typeof e=="string"?r=g.BorderWidths[e]??g.BorderWidths.medium:r=g.BorderWidths.medium,{hairline:`${g.BorderWidths.hairline}px`,thin:`${g.BorderWidths.thin}px`,medium:`${g.BorderWidths.medium}px`,thick:`${g.BorderWidths.thick}px`}}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:a=16,fontScale:i=1.25,fontWeightLight:c=g.FontWeights.light,fontWeightNormal:s=g.FontWeights.normal,fontWeightMedium:d=g.FontWeights.medium,fontWeightSemibold:u=g.FontWeights.semibold,fontWeightBold:l=g.FontWeights.bold,lineHeightTight:p=g.LineHeights.tight,lineHeightNormal:h=g.LineHeights.normal,lineHeightRelaxed:m=g.LineHeights.relaxed}=t,y=Number.isFinite(Number(a))?Number(a):16,f=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:r,mono:o},fontSize:{xs:`${Math.round(y/Math.pow(f,2))}px`,sm:`${Math.round(y/f)}px`,base:`${y}px`,lg:`${Math.round(y*f)}px`,xl:`${Math.round(y*Math.pow(f,2))}px`,"2xl":`${Math.round(y*Math.pow(f,3))}px`,"3xl":`${Math.round(y*Math.pow(f,4))}px`,"4xl":`${Math.round(y*Math.pow(f,5))}px`},fontWeight:{light:c?.toString()||"300",normal:s?.toString()||"400",medium:d?.toString()||"500",semibold:u?.toString()||"600",bold:l?.toString()||"700"},lineHeight:{tight:p?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:m?.toString()||"1.75"}}}#$(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:r=1,shadowOffsetMultiplier:o=1}=t,a=`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 ${a}, 0 ${1*o}px ${2*r}px 0 ${i}`,md:`0 ${4*o}px ${6*r}px ${-1*o}px ${a}, 0 ${2*o}px ${4*r}px ${-1*o}px ${i}`,lg:`0 ${10*o}px ${15*r}px ${-3*o}px ${a}, 0 ${4*o}px ${6*r}px ${-2*o}px ${i}`,xl:`0 ${20*o}px ${25*r}px ${-5*o}px ${a}, 0 ${10*o}px ${10*r}px ${-5*o}px ${i}`,inner:`inset 0 ${2*o}px ${4*r}px 0 ${i}`}}#P(t){let{maxWidth:e=1200,containerPadding:r=16,breakpoints:o={sm:640,md:768,lg:1024,xl:1280}}=t,a=this.#z(t);return{maxWidth:this.#a(e,"1200px"),maxWidthSm:a.sm,maxWidthMd:a.md,maxWidthLg:a.lg,maxWidthXl:a.xl,minHeight:"100vh",containerPadding:this.#a(r,"16px"),breakpoints:{sm:this.#a(o.sm,"640px"),md:this.#a(o.md,"768px"),lg:this.#a(o.lg,"1024px"),xl:this.#a(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:a=16,breakpoints:i=e}=t||{},c=this.#s(a,16),s=this.#s(o,e.xl),d={sm:this.#s(i.sm,e.sm),md:this.#s(i.md,e.md),lg:this.#s(i.lg,e.lg),xl:this.#s(i.xl,e.xl)},u=p=>p?Math.max(320,p-c*2):s,l={sm:Math.min(s,u(d.sm)),md:Math.min(s,u(d.md)),lg:Math.min(s,u(d.lg)),xl:Math.max(320,s)};return{sm:this.#a(r.sm,`${l.sm}px`),md:this.#a(r.md,`${l.md}px`),lg:this.#a(r.lg,`${l.lg}px`),xl:this.#a(r.xl,`${l.xl}px`)}}#a(t,e){return typeof t=="number"&&Number.isFinite(t)?`${t}px`:typeof t=="string"&&t.trim().length>0?t:e}#s(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){let r=parseFloat(t);if(Number.isFinite(r))return r}return e}#I(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`}}#U(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:a={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg",externalPath:c="/assets/img/icons/"}=t;return{set:e,weight:r,defaultSize:`${o}px`,sizes:Object.fromEntries(Object.entries(a).map(([s,d])=>[s,`${d}px`])),spritePath:i,externalPath:c}}#q(t){let e=[];e.push(` /* Colors */
|
|
19
|
+
</article>`:e.includes("badge")||t.id==="badge"?'<span class="badge">New</span>':`<${e}>Content</${e}>`}describeUtility(t){return t.includes("border-gradient")?"Apply animated gradient border effect":t.includes("border-glow")?"Apply glowing border effect":t.includes("flex")?"Flexbox container utility":t.includes("grid")?"Grid container utility":t.includes("gap-")?"Set gap between flex/grid children":t.includes("items-")?"Align items in flex container":t.includes("justify-")?"Justify content in flex container":t===".btn-group"?"Group buttons with connected styling":"Utility class for styling"}}});var Te={};P(Te,{deepMerge:()=>Le,fragmentFromTemplateLike:()=>ct,isObject:()=>Z,parseHTML:()=>lt});function Z(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Le(n,t){let e={...n};return Z(n)&&Z(t)&&Object.keys(t).forEach(r=>{Z(t[r])?r in n?e[r]=Le(n[r],t[r]):Object.assign(e,{[r]:t[r]}):Object.assign(e,{[r]:t[r]})}),e}function ct(n){let t=Array.isArray(n?.strings)?n.strings:[],e=Array.isArray(n?.values)?n.values:[],r=new Set,o=[],a=/(\s)(\.[\w-]+)=\s*$/;for(let l=0;l<t.length;l+=1){let p=t[l]??"",h=p.match(a);if(h&&l<e.length){let y=h[2].slice(1),f=`pds-val-${l}`;p=p.replace(a,`$1data-pds-prop="${y}:${f}"`),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 c=(l,p)=>{let h=l.parentNode;if(!h)return;if(p==null){h.removeChild(l);return}let m=y=>{if(y!=null){if(y instanceof Node){h.insertBefore(y,l);return}if(Array.isArray(y)){y.forEach(f=>m(f));return}h.insertBefore(document.createTextNode(String(y)),l)}};m(p),h.removeChild(l)},s=document.createTreeWalker(i.content,NodeFilter.SHOW_COMMENT),d=[];for(;s.nextNode();){let l=s.currentNode;l?.nodeValue?.startsWith("pds-val-")&&d.push(l)}return d.forEach(l=>{let p=Number(l.nodeValue.replace("pds-val-",""));c(l,e[p])}),i.content.querySelectorAll("*").forEach(l=>{let p=l.getAttribute("data-pds-prop");if(!p)return;let[h,m]=p.split(":"),y=Number(String(m).replace("pds-val-",""));h&&Number.isInteger(y)&&(l[h]=e[y]),l.removeAttribute("data-pds-prop")}),i.content}function lt(n){return new DOMParser().parseFromString(n,"text/html").body.childNodes}var Ae=O(()=>{});_();var I={"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"],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",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:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize: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}}};I.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 de(n="log",t,...e){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let o=console[n]||console.log;e.length>0?o(t,...e):o(t)}}_();J();var C=class n{static#g;static get instance(){return this.#g}#e;#o;constructor(t={}){this.options={debug:!1,...t},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),n.#g=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#ke(),typeof CSSStyleSheet<"u"?this.#Fe():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.#m(r,e.light),a=this.#$(o),i=e.dark!=null?this.#$(this.#m(r,e.dark)):null;return{colors:this.#F(t.colors||{},e),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#N(t.shape||{}),borderWidths:this.#O(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:a,darkShadows:i,layout:this.#P(t.layout||{}),transitions:this.#I(t.behavior||{}),zIndex:this.#U(t.layers||{}),icons:this.#H(t.icons||{})}}#M(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)}#m(t={},e){let r={...t};return e!=null&&(r.baseShadowOpacity=e),r}#F(t,e={}){let{primary:r="#3b82f6",secondary:o="#64748b",accent:a="#ec4899",background:i="#ffffff",success:c=null,warning:s="#FFBF00",danger:d=null,info:u=null,darkMode:l={}}=t,p={primary:this.#r(r),secondary:this.#r(o),accent:this.#r(a),success:this.#r(c||this.#E(r)),warning:this.#r(s||a),danger:this.#r(d||this.#C(r)),info:this.#r(u||r),gray:this.#f(o),surface:this.#b(i)};return p.surface.fieldset=this.#L(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.#j(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))}}#E(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%);"}}#L(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#T(t.sunken,.05),overlay:t.elevated}}#T(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),a=this.#b(o),i=r.primary?this.#r(r.primary):this.#i(t.primary);return{surface:{...a,fieldset:this.#B(a)},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(a=>a+a).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),a=[e/255,r/255,o/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*a[0]+.7152*a[1]+.0722*a[2]}#d(t,e){let r=this.#p(t),o=this.#p(e),a=Math.max(r,o),i=Math.min(r,o);return(a+.05)/(i+.05)}#v(t,e=4.5){if(!t)return"#000000";let r="#ffffff",o="#000000",a=this.#d(t,r);if(a>=e)return r;let i=this.#d(t,o);return i>=e||i>a?o:r}#x(t,e=1){let{r,g:o,b:a}=this.#l(t);return`rgba(${r}, ${o}, ${a}, ${e})`}#R(t,e,r=.5){let o=this.#l(t),a=this.#l(e),i=Math.round(o.r+(a.r-o.r)*r),c=Math.round(o.g+(a.g-o.g)*r),s=Math.round(o.b+(a.b-o.b)*r);return this.#W(i,c,s)}#W(t,e,r){let o=a=>{let i=Math.max(0,Math.min(255,Math.round(a))).toString(16);return i.length===1?"0"+i:i};return`#${o(t)}${o(e)}${o(r)}`}#B(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#S(t.elevated,.08),sunken:t.elevated,overlay:this.#S(t.overlay,.05)}}#j(t={},e="#000000",r=4.5){let o=["600","700","800","500","400","900","300","200"],a={shade:null,color:null,ratio:0};for(let i of o){let c=t?.[i];if(!c||typeof c!="string")continue;let s=this.#d(c,e);if(s>a.ratio&&(a={shade:i,color:c,ratio:s}),s>=r)return c}return a.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 a of r){let i=t?.[a];if(!i||typeof i!="string")continue;let c=this.#d(i,"#ffffff");if(c>o.ratio&&(o={shade:a,color:i,ratio:c}),c>=e)return i}return o.color||t?.["600"]||t?.["500"]}#k(t,e={}){let r={},o=e.light??.1,a=e.dark??.25;return Object.entries(t).forEach(([i,c])=>{if(!c||typeof c!="string"||!c.startsWith("#"))return;let s=this.#p(c)<.5,d=this.#v(c,4.5),u=this.#v(c,3),l=this.#R(d,c,.4),p=d,h=l,m=s?"#ffffff":"#000000",y=s?a:o,f=this.#x(m,y),w=s?"#ffffff":"#000000",$=s?.15:.1,z=this.#x(w,$);r[i]={bg:c,text:d,textSecondary:u,textMuted:l,icon:p,iconSubtle:h,shadow:f,border:z,scheme:s?"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,a])=>{let i=t[a.source];e[o]=this.#D(i,a.dimFactor)}),e}#D(t,e=.8){let r=this.#n(t),o=Math.max(r.s*e,5),a=Math.max(r.l*e,5);return this.#t(r.h,o,a)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:r=1.25,maxSpacingSteps:o=12}=t,a=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(o))?Number(o):12,12),c={0:"0"};for(let s=1;s<=i;s++)c[s]=`${a*s}px`;return c}#N(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 a=Number.isFinite(Number(o))?Number(o):g.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(a*.25)?Math.round(a*.25):0}px`,sm:`${Number.isFinite(a*.5)?Math.round(a*.5):0}px`,md:`${a}px`,lg:`${Number.isFinite(a*1.5)?Math.round(a*1.5):0}px`,xl:`${Number.isFinite(a*2)?Math.round(a*2):0}px`,full:"9999px"}}#O(t){let{borderWidth:e="medium"}=t,r;return typeof e=="number"?r=e:typeof e=="string"?r=g.BorderWidths[e]??g.BorderWidths.medium:r=g.BorderWidths.medium,{hairline:`${g.BorderWidths.hairline}px`,thin:`${g.BorderWidths.thin}px`,medium:`${g.BorderWidths.medium}px`,thick:`${g.BorderWidths.thick}px`}}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:a=16,fontScale:i=1.25,fontWeightLight:c=g.FontWeights.light,fontWeightNormal:s=g.FontWeights.normal,fontWeightMedium:d=g.FontWeights.medium,fontWeightSemibold:u=g.FontWeights.semibold,fontWeightBold:l=g.FontWeights.bold,lineHeightTight:p=g.LineHeights.tight,lineHeightNormal:h=g.LineHeights.normal,lineHeightRelaxed:m=g.LineHeights.relaxed}=t,y=Number.isFinite(Number(a))?Number(a):16,f=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:r,mono:o},fontSize:{xs:`${Math.round(y/Math.pow(f,2))}px`,sm:`${Math.round(y/f)}px`,base:`${y}px`,lg:`${Math.round(y*f)}px`,xl:`${Math.round(y*Math.pow(f,2))}px`,"2xl":`${Math.round(y*Math.pow(f,3))}px`,"3xl":`${Math.round(y*Math.pow(f,4))}px`,"4xl":`${Math.round(y*Math.pow(f,5))}px`},fontWeight:{light:c?.toString()||"300",normal:s?.toString()||"400",medium:d?.toString()||"500",semibold:u?.toString()||"600",bold:l?.toString()||"700"},lineHeight:{tight:p?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:m?.toString()||"1.75"}}}#$(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:r=1,shadowOffsetMultiplier:o=1}=t,a=`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 ${a}, 0 ${1*o}px ${2*r}px 0 ${i}`,md:`0 ${4*o}px ${6*r}px ${-1*o}px ${a}, 0 ${2*o}px ${4*r}px ${-1*o}px ${i}`,lg:`0 ${10*o}px ${15*r}px ${-3*o}px ${a}, 0 ${4*o}px ${6*r}px ${-2*o}px ${i}`,xl:`0 ${20*o}px ${25*r}px ${-5*o}px ${a}, 0 ${10*o}px ${10*r}px ${-5*o}px ${i}`,inner:`inset 0 ${2*o}px ${4*r}px 0 ${i}`}}#P(t){let{maxWidth:e=1200,containerPadding:r=16,breakpoints:o={sm:640,md:768,lg:1024,xl:1280}}=t,a=this.#z(t);return{maxWidth:this.#a(e,"1200px"),maxWidthSm:a.sm,maxWidthMd:a.md,maxWidthLg:a.lg,maxWidthXl:a.xl,minHeight:"100vh",containerPadding:this.#a(r,"16px"),breakpoints:{sm:this.#a(o.sm,"640px"),md:this.#a(o.md,"768px"),lg:this.#a(o.lg,"1024px"),xl:this.#a(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:a=16,breakpoints:i=e}=t||{},c=this.#s(a,16),s=this.#s(o,e.xl),d={sm:this.#s(i.sm,e.sm),md:this.#s(i.md,e.md),lg:this.#s(i.lg,e.lg),xl:this.#s(i.xl,e.xl)},u=p=>p?Math.max(320,p-c*2):s,l={sm:Math.min(s,u(d.sm)),md:Math.min(s,u(d.md)),lg:Math.min(s,u(d.lg)),xl:Math.max(320,s)};return{sm:this.#a(r.sm,`${l.sm}px`),md:this.#a(r.md,`${l.md}px`),lg:this.#a(r.lg,`${l.lg}px`),xl:this.#a(r.xl,`${l.xl}px`)}}#a(t,e){return typeof t=="number"&&Number.isFinite(t)?`${t}px`:typeof t=="string"&&t.trim().length>0?t:e}#s(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){let r=parseFloat(t);if(Number.isFinite(r))return r}return e}#I(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`}}#U(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:a={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg",externalPath:c="/assets/img/icons/"}=t;return{set:e,weight:r,defaultSize:`${o}px`,sizes:Object.fromEntries(Object.entries(a).map(([s,d])=>[s,`${d}px`])),spritePath:i,externalPath:c}}#q(t){let e=[];e.push(` /* Colors */
|
|
20
20
|
`);let r=(o,a="")=>{Object.entries(o).forEach(([i,c])=>{typeof c=="object"&&c!==null?r(c,`${a}${i}-`):typeof c=="string"&&e.push(` --color-${a}${i}: ${c};
|
|
21
21
|
`)})};return Object.entries(t).forEach(([o,a])=>{o!=="dark"&&o!=="surfaceSmart"&&o!=="interactive"&&typeof a=="object"&&a!==null&&r(a,`${o}-`)}),t.surfaceSmart&&(e.push(` /* Smart Surface Tokens (context-aware) */
|
|
22
22
|
`),Object.entries(t.surfaceSmart).forEach(([o,a])=>{e.push(` --surface-${o}-bg: ${a.bg};
|
|
@@ -3345,10 +3345,10 @@ export const ${t}CSS = \`${r}\`;
|
|
|
3345
3345
|
<button class="btn-primary btn-working">
|
|
3346
3346
|
<span>Saving</span>
|
|
3347
3347
|
</button>
|
|
3348
|
-
`.trim()}];var ye="pds",Ke=/^([a-z][a-z0-9+\-.]*:)?\/\//i,be=/^[a-z]:/i;function U(n=""){return n.endsWith("/")?n:`${n}/`}function et(n="",t=ye){let e=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(e)?e:`${e}/${t}`}function tt(n){return n.replace(/^\.\/+/,"")}function rt(n){return be.test(n)?n.replace(be,"").replace(/^\/+/,""):n}function at(n){return n.startsWith("public/")?n.substring(7):n}function ve(n,t={}){let e=t.segment||ye,r=t.defaultRoot||`/assets/${e}/`,o=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!o||typeof o!="string")return U(r);let a=o.trim();return a?(a=a.replace(/\\/g,"/"),a=et(a,e),a=U(a),Ke.test(a)?a:(a=tt(a),a=rt(a),a.startsWith("/")||(a=at(a),a.startsWith("/")||(a=`/${a}`),a=a.replace(/\/+/g,(i,c)=>c===0?i:"/")),U(a))):U(r)}function xe(n){let t=n.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(t.toLowerCase()))return!0;let o=document.createElement("canvas").getContext("2d");if(!o)return!1;let a="mmmmmmmmmmlli",i="72px",c="monospace";o.font=`${i} ${c}`;let s=o.measureText(a).width;o.font=`${i} "${t}", ${c}`;let d=o.measureText(a).width;return s!==d}function ot(n){return n?n.split(",").map(r=>r.trim())[0].replace(/['"]/g,"").trim():null}async function nt(n,t={}){if(!n)return Promise.resolve();let{weights:e=[400,500,600,700],italic:r=!1}=t,o=ot(n);if(!o||xe(o))return Promise.resolve();let a=encodeURIComponent(o);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${a}"]`)?(console.log(`Font "${o}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${o}" from Google Fonts...`),new Promise((c,s)=>{let d=document.createElement("link");d.rel="stylesheet";let u=r?`ital,wght@0,${e.join(";0,")};1,${e.join(";1,")}`:`wght@${e.join(";")}`;d.href=`https://fonts.googleapis.com/css2?family=${a}:${u}&display=swap`,d.setAttribute("data-font-loader",o),d.onload=()=>{console.log(`Successfully loaded font "${o}"`),c()},d.onerror=()=>{console.warn(`Failed to load font "${o}" from Google Fonts`),s(new Error(`Failed to load font: ${o}`))},document.head.appendChild(d),setTimeout(()=>{xe(o)||console.warn(`Font "${o}" did not load within timeout`),c()},5e3)}))}async function ee(n){if(!n)return Promise.resolve();let t=new Set;n.fontFamilyHeadings&&t.add(n.fontFamilyHeadings),n.fontFamilyBody&&t.add(n.fontFamilyBody),n.fontFamilyMono&&t.add(n.fontFamilyMono);let e=Array.from(t).map(r=>nt(r).catch(o=>{console.warn(`Could not load font: ${r}`,o)}));await Promise.all(e)}var st=/^[a-z][a-z0-9+\-.]*:\/\//i,H=(()=>{try{return import.meta.url}catch{return}})(),Q=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n;function Y(n,t={}){if(!n||st.test(n))return n;let{preferModule:e=!0}=t,r=()=>{if(!H)return null;try{return new URL(n,H).href}catch{return null}},o=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(n,window.location.origin).href}catch{return null}};return(e?r()||o():o()||r())||n}var Se=(()=>{if(H)try{let n=new URL(H);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",H).href}catch{return}})(),$e=!1;function ze(n){$e||typeof document>"u"||($e=!0,n.addEventListener("pds:ready",t=>{let e=t.detail?.mode;e&&document.documentElement.classList.add(`pds-${e}`,"pds-ready")}))}function ae(n={},t={}){if(!t||typeof t!="object")return n;let e=Array.isArray(n)?[...n]:{...n};for(let[r,o]of Object.entries(t))o&&typeof o=="object"&&!Array.isArray(o)?e[r]=ae(e[r]&&typeof e[r]=="object"?e[r]:{},o):e[r]=o;return e}function re(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function
|
|
3348
|
+
`.trim()}];var ye="pds",Ke=/^([a-z][a-z0-9+\-.]*:)?\/\//i,be=/^[a-z]:/i;function U(n=""){return n.endsWith("/")?n:`${n}/`}function et(n="",t=ye){let e=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(e)?e:`${e}/${t}`}function tt(n){return n.replace(/^\.\/+/,"")}function rt(n){return be.test(n)?n.replace(be,"").replace(/^\/+/,""):n}function at(n){return n.startsWith("public/")?n.substring(7):n}function ve(n,t={}){let e=t.segment||ye,r=t.defaultRoot||`/assets/${e}/`,o=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!o||typeof o!="string")return U(r);let a=o.trim();return a?(a=a.replace(/\\/g,"/"),a=et(a,e),a=U(a),Ke.test(a)?a:(a=tt(a),a=rt(a),a.startsWith("/")||(a=at(a),a.startsWith("/")||(a=`/${a}`),a=a.replace(/\/+/g,(i,c)=>c===0?i:"/")),U(a))):U(r)}function xe(n){let t=n.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(t.toLowerCase()))return!0;let o=document.createElement("canvas").getContext("2d");if(!o)return!1;let a="mmmmmmmmmmlli",i="72px",c="monospace";o.font=`${i} ${c}`;let s=o.measureText(a).width;o.font=`${i} "${t}", ${c}`;let d=o.measureText(a).width;return s!==d}function ot(n){return n?n.split(",").map(r=>r.trim())[0].replace(/['"]/g,"").trim():null}async function nt(n,t={}){if(!n)return Promise.resolve();let{weights:e=[400,500,600,700],italic:r=!1}=t,o=ot(n);if(!o||xe(o))return Promise.resolve();let a=encodeURIComponent(o);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${a}"]`)?(console.log(`Font "${o}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${o}" from Google Fonts...`),new Promise((c,s)=>{let d=document.createElement("link");d.rel="stylesheet";let u=r?`ital,wght@0,${e.join(";0,")};1,${e.join(";1,")}`:`wght@${e.join(";")}`;d.href=`https://fonts.googleapis.com/css2?family=${a}:${u}&display=swap`,d.setAttribute("data-font-loader",o),d.onload=()=>{console.log(`Successfully loaded font "${o}"`),c()},d.onerror=()=>{console.warn(`Failed to load font "${o}" from Google Fonts`),s(new Error(`Failed to load font: ${o}`))},document.head.appendChild(d),setTimeout(()=>{xe(o)||console.warn(`Font "${o}" did not load within timeout`),c()},5e3)}))}async function ee(n){if(!n)return Promise.resolve();let t=new Set;n.fontFamilyHeadings&&t.add(n.fontFamilyHeadings),n.fontFamilyBody&&t.add(n.fontFamilyBody),n.fontFamilyMono&&t.add(n.fontFamilyMono);let e=Array.from(t).map(r=>nt(r).catch(o=>{console.warn(`Could not load font: ${r}`,o)}));await Promise.all(e)}var st=/^[a-z][a-z0-9+\-.]*:\/\//i,H=(()=>{try{return import.meta.url}catch{return}})(),Q=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n;function Y(n,t={}){if(!n||st.test(n))return n;let{preferModule:e=!0}=t,r=()=>{if(!H)return null;try{return new URL(n,H).href}catch{return null}},o=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(n,window.location.origin).href}catch{return null}};return(e?r()||o():o()||r())||n}var Se=(()=>{if(H)try{let n=new URL(H);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",H).href}catch{return}})(),$e=!1;function ze(n){$e||typeof document>"u"||($e=!0,n.addEventListener("pds:ready",t=>{let e=t.detail?.mode;e&&document.documentElement.classList.add(`pds-${e}`,"pds-ready")}))}function ae(n={},t={}){if(!t||typeof t!="object")return n;let e=Array.isArray(n)?[...n]:{...n};for(let[r,o]of Object.entries(t))o&&typeof o=="object"&&!Array.isArray(o)?e[r]=ae(e[r]&&typeof e[r]=="object"?e[r]:{},o):e[r]=o;return e}function re(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function N(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(e=>N(e)).filter(e=>e!==void 0);let t={};for(let e in n)if(n.hasOwnProperty(e)){let r=n[e];if(typeof r!="function"){let o=N(r);o!==void 0&&(t[e]=o)}}return t}function Me(n={},t={},{presets:e,defaultLog:r}){let o=typeof n=="object"&&("colors"in n||"typography"in n||"spatialRhythm"in n||"shape"in n||"behavior"in n||"layout"in n||"advanced"in n||"a11y"in n||"components"in n||"icons"in n),a=n&&n.enhancers;a&&!Array.isArray(a)&&(a=Object.values(a));let i=a??t.enhancers??[],c=n&&n.preset,s=n&&n.design,d=n&&n.icons&&typeof n.icons=="object"?n.icons:null,u="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),l,p=null;if(u){let h=String(c||"default").toLowerCase(),m=e?.[h]||Object.values(e||{}).find(b=>re(b.name)===h||String(b.name||"").toLowerCase()===h);if(!m)throw new Error(`PDS preset not found: "${c||"default"}"`);p={id:m.id||re(m.name),name:m.name||m.id||String(h)};let y=structuredClone(m);if(s&&typeof s=="object"||d){let b=s?N(s):{},x=d?N(d):null,v=x?ae(b,{icons:x}):b;y=ae(y,structuredClone(v))}let{mode:f,autoDefine:w,applyGlobalStyles:$,manageTheme:z,themeStorageKey:T,preloadStyles:R,criticalLayers:j,managerURL:W,manager:G,preset:k,design:M,enhancers:S,log:E,...A}=n;l={...A,design:y,preset:p.name,log:E||r}}else if(o){let{log:h,...m}=n;l={design:structuredClone(m),log:h||r}}else{let h=e?.default||Object.values(e||{}).find(m=>re(m.name)==="default");if(!h)throw new Error("PDS default preset not available");p={id:h.id||"default",name:h.name||"Default"},l={design:structuredClone(h),preset:p.name,log:r}}return{generatorConfig:l,enhancers:i,presetInfo:p}}function Fe({manageTheme:n,themeStorageKey:t,applyResolvedTheme:e,setupSystemListenerIfNeeded:r}){let o="light",a=null;if(n&&typeof window<"u"){try{a=localStorage.getItem(t)||null}catch{a=null}try{e?.(a),r?.(a)}catch{}a?a==="system"?o=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":o=a:o=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:o,storedTheme:a}}function Ee(n,{resolvePublicAssetURL:t}){let e=!!(n?.public?.root||n?.static?.root),r=t(n);return!e&&Se&&(r=Se),Q(Y(r))}async function Ce(n,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:r=[],autoDefineMapper:o=null,enhancers:a=[],autoDefineOverrides:i=null,autoDefinePreferModule:c=!0}=n,s=(()=>{let u=new Map;return(t||[]).forEach(l=>u.set(l.selector,l)),(a||[]).forEach(l=>u.set(l.selector,l)),Array.from(u.values())})(),d=null;if(typeof window<"u"&&typeof document<"u"){let u=null;try{let f=await Promise.resolve().then(()=>(ke(),we));u=f?.AutoDefiner||f?.default?.AutoDefiner||f?.default||null}catch(f){console.warn("AutoDefiner not available:",f?.message||f)}let l=f=>{switch(f){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${f}.js`}},{mapper:p,...h}=i&&typeof i=="object"?i:{},y={baseURL:e&&Q(Y(e,{preferModule:c})),predefine:r,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:s,onError:(f,w)=>{if(typeof f=="string"&&f.startsWith("pds-")){let z=["pds-form","pds-drawer"].includes(f),T=w?.message?.includes("#pds/lit")||w?.message?.includes("Failed to resolve module specifier");z&&T?console.error(`\u274C PDS component <${f}> requires Lit but #pds/lit is not in import map.
|
|
3349
3349
|
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${f}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${f}>:`,w)},...h,mapper:f=>{if(customElements.get(f))return null;if(typeof o=="function")try{let w=o(f);return w===void 0?l(f):w}catch(w){return console.warn("Custom autoDefine.mapper error; falling back to default:",w?.message||w),l(f)}return l(f)}};u&&(d=new u(y),r.length>0&&typeof u.define=="function"&&await u.define(...r,{baseURL:e,mapper:y.mapper,onError:y.onError}))}return{autoDefiner:d,mergedEnhancers:s}}var Re=!1,q=null,dt="pds-configurator",se=null,ce=null,We=!1;function pt(){return typeof BroadcastChannel>"u"?null:(se||(se=new BroadcastChannel(dt)),ce||(ce=`pds-${Math.random().toString(36).slice(2)}`),se)}async function ut(n,{applyResolvedTheme:t,setupSystemListenerIfNeeded:e}){if(Re)return;let[r,o,a,i]=await Promise.all([Promise.resolve().then(()=>(J(),ue)),Promise.resolve().then(()=>(_(),le)),Promise.resolve().then(()=>(ie(),ne)),Promise.resolve().then(()=>(Ae(),Te))]),c=r?.default||r?.ontology,s=r?.findComponentForElement,d=o?.enums;q=a?.PDSQuery||a?.default||null,n.ontology=c,n.findComponentForElement=s,n.enums=d,n.common=i||{},n.presets=I,n.enhancerMetadata=fe,n.applyStyles=function(u){return V(u||C.instance)},n.adoptLayers=function(u,l,p){return he(u,l,p,C.instance)},n.adoptPrimitives=function(u,l){return ge(u,l,C.instance)},n.getGenerator=async function(){return C},n.query=async function(u){if(!q){let p=await Promise.resolve().then(()=>(ie(),ne));q=p?.PDSQuery||p?.default||null}return q?await new q(n).search(u):[]},Object.getOwnPropertyDescriptor(n,"compiled")||Object.defineProperty(n,"compiled",{get(){return n.registry?.isLive&&C.instance?C.instance.compiled:null},enumerable:!0,configurable:!1}),n.preloadCritical=function(u,l={}){if(typeof window>"u"||!document.head||!u)return;let{theme:p,layers:h=["tokens"]}=l;try{let m=p||"light";(p==="system"||!p)&&(m=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",m);let y=u.design?{...u,theme:m}:{design:u,theme:m},f=new C(y),w=h.map($=>{try{return f.css?.[$]||""}catch{return""}}).filter($=>$.trim()).join(`
|
|
3350
3350
|
`);if(w){let $=document.head.querySelector("style[data-pds-preload]");$&&$.remove();let z=document.createElement("style");z.setAttribute("data-pds-preload",""),z.textContent=w,document.head.insertBefore(z,document.head.firstChild)}}catch(m){console.warn("PDS preload failed:",m)}},Re=!0}async function gt(n,t,{emitReady:e,applyResolvedTheme:r,setupSystemListenerIfNeeded:o}){if(!t||typeof t!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(await ut(n,{applyResolvedTheme:r,setupSystemListenerIfNeeded:o}),ze(n),typeof document<"u"&&document.adoptedStyleSheets){let p=`
|
|
3351
3351
|
html { opacity: 0; }
|
|
3352
3352
|
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3353
|
-
`;try{if(!document.adoptedStyleSheets.some(m=>m._pdsFouc)){let m=new CSSStyleSheet;m.replaceSync(p),m._pdsFouc=!0,document.adoptedStyleSheets=[m,...document.adoptedStyleSheets]}}catch(h){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",h),!document.head.querySelector("style[data-pds-fouc]")){let y=document.createElement("style");y.setAttribute("data-pds-fouc",""),y.textContent=p,document.head.insertBefore(y,document.head.firstChild)}}}let a=t.applyGlobalStyles??!0,i=t.manageTheme??!0,c=t.themeStorageKey??"pure-ds-theme",s=t.preloadStyles??!1,d=t.criticalLayers??["tokens","primitives"],u=t.applyConfiguratorStyles??!1
|
|
3354
|
-
`);if(k){let M=document.head.querySelector("style[data-pds-critical]");M&&M.remove();let S=document.createElement("style");S.setAttribute("data-pds-critical",""),S.textContent=k;let E=document.head.querySelector('meta[charset], meta[name="viewport"]');E?E.parentNode.insertBefore(S,E.nextSibling):document.head.insertBefore(S,document.head.firstChild)}}catch(k){w?.log?.("warn","Failed to preload critical styles:",k)}n.registry.setLiveMode(),h.presetInfo?.name?w?.log?.("log",`PDS live with preset "${h.presetInfo.name}"`):w?.log?.("log","PDS live with custom config"),a&&(await V(C.instance),typeof window<"u"&&setTimeout(()=>{let k=document.head.querySelector("style[data-pds-critical]");k&&k.remove();let M=document.head.querySelector("style[data-pds-preload]");M&&M.remove();let S=document.getElementById("pds-runtime-stylesheet");S&&S.remove()},100));let z=Ee(t,{resolvePublicAssetURL:ve}),T;l&&l.baseURL?T=Q(Y(l.baseURL,{preferModule:!1})):T=`${z}components/`;let R=null,j=[];try{let k=await Ce({autoDefineBaseURL:T,autoDefinePreload:l&&Array.isArray(l.predefine)&&l.predefine||[],autoDefineMapper:l&&typeof l.mapper=="function"&&l.mapper||null,enhancers:m,autoDefineOverrides:l||null,autoDefinePreferModule:!(l&&l.baseURL)},{baseEnhancers:me});R=k.autoDefiner,j=k.mergedEnhancers||[]}catch(k){w?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",k)}let W=$?.options||w,G=
|
|
3353
|
+
`;try{if(!document.adoptedStyleSheets.some(m=>m._pdsFouc)){let m=new CSSStyleSheet;m.replaceSync(p),m._pdsFouc=!0,document.adoptedStyleSheets=[m,...document.adoptedStyleSheets]}}catch(h){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",h),!document.head.querySelector("style[data-pds-fouc]")){let y=document.createElement("style");y.setAttribute("data-pds-fouc",""),y.textContent=p,document.head.insertBefore(y,document.head.firstChild)}}}let a=t.applyGlobalStyles??!0,i=t.manageTheme??!0,c=t.themeStorageKey??"pure-ds-theme",s=t.preloadStyles??!1,d=t.criticalLayers??["tokens","primitives"],u=t.applyConfiguratorStyles??!1;u&&console.warn("\u{1F4E2} This app is listening to PDS Configurator change broadcasting and will immediately apply configurator styles");let l=t&&t.autoDefine||null;try{let{resolvedTheme:p}=Fe({manageTheme:i,themeStorageKey:c,applyResolvedTheme:r,setupSystemListenerIfNeeded:o}),h=Me(t,{},{presets:I,defaultLog:de}),m=h.enhancers,{log:y,...f}=h.generatorConfig,w=structuredClone(f);w.log=y,i&&(w.theme=p);let $=new C(w);if(w.design?.typography)try{await ee(w.design.typography)}catch(k){w?.log?.("warn","Failed to load some fonts from Google Fonts:",k)}if(s&&typeof window<"u"&&document.head)try{let k=d.map(M=>{try{return $.css?.[M]||""}catch(S){return w?.log?.("warn",`Failed to generate critical CSS for layer "${M}":`,S),""}}).filter(M=>M.trim()).join(`
|
|
3354
|
+
`);if(k){let M=document.head.querySelector("style[data-pds-critical]");M&&M.remove();let S=document.createElement("style");S.setAttribute("data-pds-critical",""),S.textContent=k;let E=document.head.querySelector('meta[charset], meta[name="viewport"]');E?E.parentNode.insertBefore(S,E.nextSibling):document.head.insertBefore(S,document.head.firstChild)}}catch(k){w?.log?.("warn","Failed to preload critical styles:",k)}n.registry.setLiveMode(),h.presetInfo?.name?w?.log?.("log",`PDS live with preset "${h.presetInfo.name}"`):w?.log?.("log","PDS live with custom config"),a&&(await V(C.instance),typeof window<"u"&&setTimeout(()=>{let k=document.head.querySelector("style[data-pds-critical]");k&&k.remove();let M=document.head.querySelector("style[data-pds-preload]");M&&M.remove();let S=document.getElementById("pds-runtime-stylesheet");S&&S.remove()},100));let z=Ee(t,{resolvePublicAssetURL:ve}),T;l&&l.baseURL?T=Q(Y(l.baseURL,{preferModule:!1})):T=`${z}components/`;let R=null,j=[];try{let k=await Ce({autoDefineBaseURL:T,autoDefinePreload:l&&Array.isArray(l.predefine)&&l.predefine||[],autoDefineMapper:l&&typeof l.mapper=="function"&&l.mapper||null,enhancers:m,autoDefineOverrides:l||null,autoDefinePreferModule:!(l&&l.baseURL)},{baseEnhancers:me});R=k.autoDefiner,j=k.mergedEnhancers||[]}catch(k){w?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",k)}let W=$?.options||w,G=N(t);if(n.currentConfig=Object.freeze({mode:"live",...structuredClone(G),design:structuredClone(h.generatorConfig.design),preset:h.generatorConfig.preset,theme:p,enhancers:j}),u){let k=pt();k||console.warn("[PDS Live] BroadcastChannel unavailable; configurator updates will not be received."),k&&!We&&(We=!0,console.log("[PDS Live] Listening for configurator broadcasts."),k.addEventListener("message",async M=>{try{let S=M?.data;if(!S||S.type!=="pds:configurator:design"||S.sourceId&&S.sourceId===ce)return;console.log("[PDS Live] Received configurator broadcast.");let E=S.payload?.config;if(!E||typeof E!="object")return;let A=S.payload?.theme||null;if(A)try{n.theme=A}catch{}if(E.typography)try{await ee(E.typography)}catch{}let b={design:structuredClone(E)};A&&(b.theme=A);let x=new C(b);V(x),console.log("[PDS Live] Applied configurator styles from broadcast.")}catch(S){console.warn("Failed to apply broadcasted configurator styles:",S)}}))}return e({mode:"live",generator:$,config:W,theme:p,autoDefiner:R}),{generator:$,config:W,theme:p,autoDefiner:R}}catch(p){throw n.dispatchEvent(new CustomEvent("pds:error",{detail:{error:p}})),p}}export{gt as startLive};
|
|
@@ -198,8 +198,12 @@ export async function startLive(PDS, config, { emitReady, applyResolvedTheme, se
|
|
|
198
198
|
let themeStorageKey = config.themeStorageKey ?? "pure-ds-theme";
|
|
199
199
|
let preloadStyles = config.preloadStyles ?? false;
|
|
200
200
|
let criticalLayers = config.criticalLayers ?? ["tokens", "primitives"];
|
|
201
|
+
|
|
201
202
|
let applyConfiguratorStyles = config.applyConfiguratorStyles ?? false;
|
|
202
203
|
|
|
204
|
+
if(applyConfiguratorStyles)
|
|
205
|
+
console.warn("📢 This app is listening to PDS Configurator change broadcasting and will immediately apply configurator styles");
|
|
206
|
+
|
|
203
207
|
const cfgAuto = (config && config.autoDefine) || null;
|
|
204
208
|
|
|
205
209
|
try {
|
|
@@ -363,14 +367,20 @@ export async function startLive(PDS, config, { emitReady, applyResolvedTheme, se
|
|
|
363
367
|
|
|
364
368
|
if (applyConfiguratorStyles) {
|
|
365
369
|
const channel = __getBroadcastChannel();
|
|
370
|
+
if (!channel) {
|
|
371
|
+
console.warn("[PDS Live] BroadcastChannel unavailable; configurator updates will not be received.");
|
|
372
|
+
}
|
|
366
373
|
if (channel && !__broadcastListenerAttached) {
|
|
367
374
|
__broadcastListenerAttached = true;
|
|
375
|
+
console.log("[PDS Live] Listening for configurator broadcasts.");
|
|
368
376
|
channel.addEventListener("message", async (event) => {
|
|
369
377
|
try {
|
|
370
378
|
const data = event?.data;
|
|
371
379
|
if (!data || data.type !== "pds:configurator:design") return;
|
|
372
380
|
if (data.sourceId && data.sourceId === __broadcastId) return;
|
|
373
381
|
|
|
382
|
+
console.log("[PDS Live] Received configurator broadcast.");
|
|
383
|
+
|
|
374
384
|
const incomingConfig = data.payload?.config;
|
|
375
385
|
if (!incomingConfig || typeof incomingConfig !== "object") return;
|
|
376
386
|
|
|
@@ -398,6 +408,7 @@ export async function startLive(PDS, config, { emitReady, applyResolvedTheme, se
|
|
|
398
408
|
|
|
399
409
|
const incomingGenerator = new Generator(generatorOptions);
|
|
400
410
|
applyStyles(incomingGenerator);
|
|
411
|
+
console.log("[PDS Live] Applied configurator styles from broadcast.");
|
|
401
412
|
} catch (ex) {
|
|
402
413
|
console.warn("Failed to apply broadcasted configurator styles:", ex);
|
|
403
414
|
}
|