@axel669/windstorm 1.0.0-beta.0 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ws-es5.js CHANGED
@@ -1,4 +1,4 @@
1
- var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>{const o=r.length;return()=>r===e.substr(N,o)?(N+=o,r):t},a=r=>()=>{const o=e.charAt(N);return!1!==r.test(o)?(N+=1,o):t};let n=null;const s=o("@"),i=o(":"),l=a(/[^;]/),c=o(";"),d=o("*"),p=a(/[a-z0-9_\-]/i),h=o("!"),u=a(/[^{]/),g=o("{"),b=o("}"),f=a(/[a-zA-Z0-9\.\-_#\^\$\/]/),m=o("#"),x=a(/[^;#]/),v=a(/[\s]/m),w=()=>{const e=N;let r=null,o=null;return(r=P())===t||(o=z())===t?(N=e,t):[r,o]},y=()=>{const r=N;let o=null,a=null;return(o=m())===t||(a=(()=>{const r=N,o=N;for(;x()!==t;);return N-o==0?t:e.slice(r,N)})())===t?(N=r,t):[o,a]},k=()=>{n="rules";let e=N,r=null;const o=[];let a=null;for(;(a=w())!==t;)o.push(a);if(r=o,P()===t)return N=e,t;return r.map((e=>e[1]))},z=()=>{let e=null;return(e=$())!==t||(e=A())!==t||(e=E())!==t||(e=L())!==t?e:t},$=()=>{n="rule$0";let e=N,r=null;if((r=S())===t)return N=e,t;return r},A=()=>{n="rule$1";let e=N,r=null;if((r=M())===t)return N=e,t;return r},E=()=>{n="rule$2";let e=N,r=null;if((r=C())===t)return N=e,t;return r},L=()=>{n="rule$3";let e=N,r=null;if((r=V())===t)return N=e,t;return r},S=()=>{n="variable";let r=N,o=null,a=null;if(s()===t)return N=r,t;if((o=q())===t)return N=r,t;if(i()===t)return N=r,t;if(P()===t)return N=r,t;if((a=(()=>{const r=N,o=N;for(;l()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;if(c()===t)return N=r,t;return((e,t)=>({type:"var",name:e,value:t}))(o,a)},M=()=>{n="css";let r=N,o=null,a=null;if(d()===t)return N=r,t;if((o=q())===t)return N=r,t;if(i()===t)return N=r,t;if(P()===t)return N=r,t;if((a=(()=>{const r=N,o=N;for(;l()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;if(c()===t)return N=r,t;return((e,t)=>({type:"css",name:e,value:t}))(o,a)},q=()=>{n="cssName";let r=N,o=null;if((o=(()=>{const r=N,o=N;for(;p()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;return o},C=()=>{n="subrule";let r=N,o=null,a=null;if(h()===t)return N=r,t;if(P()===t)return N=r,t;if((o=(()=>{const r=N,o=N;for(;u()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;if(g()===t)return N=r,t;if((a=k())===t)return N=r,t;if(b()===t)return N=r,t;var s;return s=a,{type:"alt",selector:o.trim(),rules:s}},V=()=>{n="macro";let r=N,o=null,a=null;if((o=(()=>{const r=N,o=N;for(;f()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;const s=(()=>{const e=N;let r=null,o=null,a=null;return(r=i())===t||(o=P())===t||(a=I())===t?(N=e,t):[r,o,a]})();if(a=s===t?null:s,c()===t)return N=r,t;return((e,t)=>({type:"macro",name:e,value:t?.[2]}))(o,a)},I=()=>{let e=null;return(e=T())!==t||(e=j())!==t?e:t},T=()=>{n="macroValue$0";let e=null;const r=[];let o=null;for(;(o=y())!==t;)r.push(o);if(0===r.length)return t;e=r;return(e=>{const t=e.map((e=>e[1].trim()));return t.arg=t.join(" "),t})(e)},j=()=>{n="macroValue$1";let r=N,o=null;if((o=(()=>{const r=N,o=N;for(;l()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;return(e=>{const t=[e.trim()];return t.arg=e,t})(o)},P=()=>{for(n="_";v()!==t;);};let N=0;const H=(()=>{n="$";let e=N,r=null;if((r=k())===t)return N=e,t;return r})();return N!==e.length?(console.log("last",n),console.log("@",N),console.log(e.slice(N-10,N+10)),new Error("End of input not found")):H},o=document.createElement("style");o.setAttribute("data-name","windstorm-generated"),o.innerHTML="@layer ws.custom ws.macro ws.user;",document.head.append(o);const a=(e,...t)=>{const o=String.raw(e,...t);return n(r(o),{"&":[]},"&")},n=(e,t,r)=>{for(const o of e)i(o,t,r);return t},s=e=>e.replace(/@([a-zA-Z0-9\-_]+)/g,((e,t)=>`var(--${t})`)),i=(e,t,r)=>{if("var"===e.type)return void t[r].push(`--${e.name}: ${s(e.value)};`);if("css"===e.type)return void t[r].push(`${e.name}: ${s(e.value)};`);if("macro"===e.type){const o=l[e.name];if(void 0===o)return void console.warn(`no macro for "${e.name}"`);for(const[a,n]of Object.entries(o)){const o=a.replace("&",r);t[o]=t[o]??[],t[o].push(...n.map((t=>s(t.replace(/%(arg|\d+)/g,((t,r)=>e.value?.[r]??""))))))}return}const o=e.selector.replaceAll("&",r);t[o]=[...t[o]??[]],n(e.rules,t,o)},l={},c=e=>(t,...r)=>l[e]=a(t,...r),d=e=>Object.entries(e).reduce(((e,[t,r])=>{if(!0===t.startsWith("|")){const o=t.lastIndexOf("|"),a=[`@media (${t.slice(1,o)}) {`,`${`&${t.slice(o+1)}`} {`,...r,"}","}"].join("\n");return e.push(a),e}return e.push(`${t} {\n${r.join("\n")}\n}`),e}),[]),p=(e,t="ws.custom")=>(r,...n)=>{const s=a(r,...n),i=d(s).map((t=>t.replaceAll("&",e))),l=`@layer ${t} { ${i.join("\n")} }`;o.sheet.insertRule(l)};const h={attr:"ws-x",origin:"https://wind-cdn.axel669.net",...window.wsConfig,version:"1.0.0-beta.0",fontVersion:"2",iconVersion:"3.34.0"},u={},g=async(e,t)=>{const r=u[t],o=`ws-icon-${t}`;if(void 0!==r){if(await r.loaded,"loaded"!==r.status||null===e)return;return void e.style.setProperty("--icon-font",o)}const a=new FontFace(o,`url(${h.origin}/icon/${t}.woff?v${h.iconVersion})`);u[t]=a;try{await a.load()}catch(e){console.error(e)}document.fonts.add(a),g(e,t)},b=e=>{if(void 0===e.tagName)return;const t=e.dataset.icon??null;null!==t&&g(e,t)},f={childList(e){0!==e.addedNodes.length&&e.addedNodes.forEach((e=>{if(void 0===e.tagName)return;[e,...e.querySelectorAll("*")].forEach(b)}))},attributes(e){b(e.target)}};new MutationObserver((e=>e.forEach((e=>f[e.type](e))))).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-icon"]});const m=(...e)=>{for(const t of e)g(null,t)};c("appr")`*apperance: %arg; *-webkit-appearance: %arg;`,c("area")`*grid-area: %arg;`,c("b")`*border: %arg;`,c("b.b")`*border-bottom: %arg;`,c("b.b.c")`*border-bottom-color: %arg;`,c("b.b.s")`*border-bottom-style: %arg;`,c("b.b.w")`*border-bottom-width: %arg;`,c("b.c")`*border-color: %arg;`,c("b.l")`*border-left: %arg;`,c("b.l.c")`*border-left-color: %arg;`,c("b.l.s")`*border-left-style: %arg;`,c("b.l.w")`*border-left-width: %arg;`,c("b.r")`*border-right: %arg;`,c("b.r.c")`*border-right-color: %arg;`,c("b.r.s")`*border-right-style: %arg;`,c("b.r.w")`*border-right-width: %arg;`,c("b.s")`*border-style: %arg;`,c("b.t")`*border-top: %arg;`,c("b.t.c")`*border-top-color: %arg;`,c("b.t.s")`*border-top-style: %arg;`,c("b.t.w")`*border-top-width: %arg;`,c("b.w")`*border-width: %arg;`,c("b.x")`*border-left: %arg; *border-right: %arg;`,c("b.x.c")`*border-left-color: %arg; *border-right-color: %arg;`,c("b.x.s")`*border-left-style: %arg; *border-right-style: %arg;`,c("b.x.w")`*border-left-width: %arg; *border-right-width: %arg;`,c("b.y")`*border-top: %arg; *border-bottom: %arg;`,c("b.y.c")`*border-top-color: %arg; *border-bottom-color: %arg;`,c("b.y.s")`*border-top-style: %arg; *border-bottom-style: %arg;`,c("b.y.w")`*border-top-width: %arg; *border-bottom-width: %arg;`,c("bg")`*background: %arg;`,c("bg.att")`*background-attachment: %arg;`,c("bg.c")`*background-color: %arg;`,c("bg.img")`*background-image: %arg;`,c("bg.pos")`*background-position: %arg;`,c("bg.rep")`*background-repeat: %arg;`,c("bg.sz")`*background-size: %arg;`,c("c")`*color: %arg;`,c("col")`*grid-column: %arg;`,c("cur")`*cursor: %arg;`,c("disp")`*display: %arg;`,c("fl.basis")`*flex-basis: %arg;`,c("fl.cross")`*align-items: %arg;`,c("fl.dir")`*flex-direction: %arg;`,c("fl.flow")`*flex-flow: %arg;`,c("fl.grow")`*flex-grow: %arg;`,c("fl.main")`*justify-content: %arg;`,c("fl.shrink")`*flex-shrink: %arg;`,c("fl.size")`*flex: %arg;`,c("fl.wr")`*flex-wrap: %arg;`,c("font")`*font-family: %arg;`,c("gap")`*gap: %arg;`,c("gap.col")`*column-gap: %arg;`,c("gap.row")`*row-gap: %arg;`,c("gr.areas")`*grid-template-areas: %arg;`,c("gr.cols")`*grid-template-columns: %arg;`,c("gr.cols.a")`*grid-auto-columns: %arg;`,c("gr.flow")`*grid-auto-flow: %arg;`,c("gr.rows")`*grid-template-rows: %arg;`,c("gr.rows.a")`*grid-auto-rows: %arg;`,c("h")`*height: %arg;`,c("h.max")`*max-height: %arg;`,c("h.min")`*min-height: %arg;`,c("inset")`*top: %arg; *left: %arg; *bottom: %arg; *right: %arg;`,c("inset.x")`*left: %arg; *right: %arg;`,c("inset.y")`*top: %arg; *bottom: %arg;`,c("m")`*margin: %arg;`,c("m.b")`*margin-bottom: %arg;`,c("m.l")`*margin-left: %arg;`,c("m.r")`*margin-right: %arg;`,c("m.t")`*margin-top: %arg;`,c("m.x")`*margin-left: %arg; *margin-right: %arg;`,c("m.y")`*margin-bottom: %arg; *margin-top: %arg;`,c("o")`*opacity: %arg;`,c("outln")`*outline: %arg;`,c("over")`*overflow: %arg;`,c("over.x")`*overflow-x: %arg;`,c("over.y")`*overflow-y: %arg;`,c("p")`*padding: %arg;`,c("p.b")`*padding-bottom: %arg;`,c("p.l")`*padding-left: %arg;`,c("p.r")`*padding-right: %arg;`,c("p.t")`*padding-top: %arg;`,c("p.x")`*padding-left: %arg; *padding-right: %arg;`,c("p.y")`*padding-top: %arg; *padding-bottom: %arg;`,c("pos")`*position: %arg;`,c("pos.abs")`*position: absolute;`,c("pos.fix")`*position: fixed;`,c("pos.rel")`*position: relative;`,c("pos.stick")`*position: sticky;`,c("r")`*border-radius: %arg;`,c("r.b")`*border-bottom-left-radius: %arg; *border-bottom-right-radius: %arg;`,c("r.bl")`*border-bottom-left-radius: %arg;`,c("r.br")`*border-bottom-right-radius: %arg;`,c("r.l")`*border-top-left-radius: %arg; *border-bottom-left-radius: %arg;`,c("r.r")`*border-top-right-radius: %arg; *border-bottom-right-radius: %arg;`,c("r.t")`*border-top-left-radius: %arg; *border-top-right-radius: %arg;`,c("r.tl")`*border-top-left-radius: %arg;`,c("r.tr")`*border-top-right-radius: %arg;`,c("row")`*grid-row: %arg;`,c("sel")`*user-select: %arg;`,c("self.cross")`*align-self: %arg;`,c("self.main")`*justify-self: %arg;`,c("sh.box")`*box-shadow: %arg;`,c("sh.text")`*text-shadow: %arg;`,c("t.a")`*text-align: %arg;`,c("t.br")`*word-break: %arg;`,c("t.c")`*color: %arg;`,c("t.deco")`*text-decoration: %arg;`,c("t.lh")`*line-height: %arg;`,c("t.over")`*text-overflow: %arg;`,c("t.st")`*font-style: %arg;`,c("t.sz")`*font-size: %arg;`,c("t.tf")`*text-transform: %arg;`,c("t.var")`*font-variant: %arg;`,c("t.wrap")`*word-wrap: %arg;`,c("t.ws")`*white-space: %arg;`,c("t.wt")`*font-weight: %arg;`,c("tf")`*transform: %arg;`,c("tf.o")`*transform-origin: %arg;`,c("tf.p")`*perspective: %arg;`,c("tr")`*transition: %arg;`,c("v.a")`*vertical-align: %arg;`,c("vis")`*visibility: %arg;`,c("w")`*width: %arg;`,c("w.max")`*max-width: %arg;`,c("w.min")`*min-width: %arg;`,c("x")`*left: %arg;`,c("-x")`*right: %arg;`,c("y")`*top: %arg;`,c("-y")`*bottom: %arg;`,c("z")`*z-index: %arg;`,c("fl.cn")`fl.cross: center; fl.main: center;`,c("fl.cn.cross")`fl.cross: center;`,c("fl.cn.main")`fl.main: center;`,c("flex")`disp: flex; fl.dir: %arg;`,c("grid")`disp: grid; gr.flow: %arg;`,c("hide")`disp: none;`,c("invis")`vis: hidden;`,c("sticky")`pos: sticky; y: 0px; z: +1;`,c("adorn")`disp: flex; fl.cn; p: 4px;`,c("pad.compact")`p: 0px 4px;`,c("variant.outline")`b.w: 1px;`,c("variant.fill")`@text-color: @alt-color; @fill-color: @core-color; @active: @alt-color;`,c("variant.lined")`b.w: 0px; b.b.w: @border-size; r.b: 0px;`,c("gr.cols-fit")`*grid-template-columns: repeat(auto-fit, minmax(%arg));`,c("gr.cols-fill")`*grid-template-columns: repeat(auto-fill, minmax(%arg));`,c("text.subtitle")`t.sz: @text-size-subtitle; flex; fl.main: center; p: 0px 8px;`,c("text.title")`t.sz: @text-size-title; flex; fl.main: center; p: 4px 8px;`,c("elevate")`sh.box: 0px 2px 3px @shadow-color;`,c("#animate")`
1
+ var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>{const o=r.length;return()=>r===e.substr(N,o)?(N+=o,r):t},a=r=>()=>{const o=e.charAt(N);return!1!==r.test(o)?(N+=1,o):t};let n=null;const s=o("@"),i=o(":"),l=a(/[^;]/),c=o(";"),d=o("*"),p=a(/[a-z0-9_\-]/i),h=o("!"),u=a(/[^{]/),f=o("{"),g=o("}"),b=a(/[a-zA-Z0-9\.\-_#\^\$\/]/),m=o("#"),x=a(/[^;#]/),v=a(/[\s]/m),w=()=>{const e=N;let r=null,o=null;return(r=P())===t||(o=z())===t?(N=e,t):[r,o]},y=()=>{const r=N;let o=null,a=null;return(o=m())===t||(a=(()=>{const r=N,o=N;for(;x()!==t;);return N-o==0?t:e.slice(r,N)})())===t?(N=r,t):[o,a]},k=()=>{n="rules";let e=N,r=null;const o=[];let a=null;for(;(a=w())!==t;)o.push(a);if(r=o,P()===t)return N=e,t;return r.map((e=>e[1]))},z=()=>{let e=null;return(e=$())!==t||(e=A())!==t||(e=L())!==t||(e=E())!==t?e:t},$=()=>{n="rule$0";let e=N,r=null;if((r=S())===t)return N=e,t;return r},A=()=>{n="rule$1";let e=N,r=null;if((r=M())===t)return N=e,t;return r},L=()=>{n="rule$2";let e=N,r=null;if((r=C())===t)return N=e,t;return r},E=()=>{n="rule$3";let e=N,r=null;if((r=I())===t)return N=e,t;return r},S=()=>{n="variable";let r=N,o=null,a=null;if(s()===t)return N=r,t;if((o=q())===t)return N=r,t;if(i()===t)return N=r,t;if(P()===t)return N=r,t;if((a=(()=>{const r=N,o=N;for(;l()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;if(c()===t)return N=r,t;return((e,t)=>({type:"var",name:e,value:t}))(o,a)},M=()=>{n="css";let r=N,o=null,a=null;if(d()===t)return N=r,t;if((o=q())===t)return N=r,t;if(i()===t)return N=r,t;if(P()===t)return N=r,t;if((a=(()=>{const r=N,o=N;for(;l()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;if(c()===t)return N=r,t;return((e,t)=>({type:"css",name:e,value:t}))(o,a)},q=()=>{n="cssName";let r=N,o=null;if((o=(()=>{const r=N,o=N;for(;p()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;return o},C=()=>{n="subrule";let r=N,o=null,a=null;if(h()===t)return N=r,t;if(P()===t)return N=r,t;if((o=(()=>{const r=N,o=N;for(;u()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;if(f()===t)return N=r,t;if((a=k())===t)return N=r,t;if(g()===t)return N=r,t;var s;return s=a,{type:"alt",selector:o.trim(),rules:s}},I=()=>{n="macro";let r=N,o=null,a=null;if((o=(()=>{const r=N,o=N;for(;b()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;const s=(()=>{const e=N;let r=null,o=null,a=null;return(r=i())===t||(o=P())===t||(a=T())===t?(N=e,t):[r,o,a]})();if(a=s===t?null:s,c()===t)return N=r,t;return((e,t)=>({type:"macro",name:e,value:t?.[2]}))(o,a)},T=()=>{let e=null;return(e=V())!==t||(e=j())!==t?e:t},V=()=>{n="macroValue$0";let e=null;const r=[];let o=null;for(;(o=y())!==t;)r.push(o);if(0===r.length)return t;e=r;return(e=>{const t=e.map((e=>e[1].trim()));return t.arg=t.join(" "),t})(e)},j=()=>{n="macroValue$1";let r=N,o=null;if((o=(()=>{const r=N,o=N;for(;l()!==t;);return N-o==0?t:e.slice(r,N)})())===t)return N=r,t;return(e=>{const t=[e.trim()];return t.arg=e,t})(o)},P=()=>{for(n="_";v()!==t;);};let N=0;const H=(()=>{n="$";let e=N,r=null;if((r=k())===t)return N=e,t;return r})();return N!==e.length?(console.log("last",n),console.log("@",N),console.log(e.slice(N-10,N+10)),new Error("End of input not found")):H},o=document.createElement("style");o.setAttribute("data-name","windstorm-generated"),o.innerHTML="@layer ws.custom ws.macro ws.user;",document.head.append(o);const a=(e,...t)=>{const o=String.raw(e,...t);return n(r(o),{"&":[]},"&")},n=(e,t,r)=>{for(const o of e)i(o,t,r);return t},s=e=>e.replace(/@([a-zA-Z0-9\-_]+)/g,((e,t)=>`var(--${t})`)),i=(e,t,r)=>{if("var"===e.type)return void t[r].push(`--${e.name}: ${s(e.value)};`);if("css"===e.type)return void t[r].push(`${e.name}: ${s(e.value)};`);if("macro"===e.type){const o=l[e.name];if(void 0===o)return void console.warn(`no macro for "${e.name}"`);for(const[a,n]of Object.entries(o)){const o=a.replace("&",r);t[o]=t[o]??[],t[o].push(...n.map((t=>s(t.replace(/%(arg|\d+)/g,((t,r)=>e.value?.[r]??""))))))}return}const o=e.selector.replaceAll("&",r);t[o]=[...t[o]??[]],n(e.rules,t,o)},l={},c=e=>(t,...r)=>l[e]=a(t,...r),d=e=>Object.entries(e).reduce(((e,[t,r])=>{if(!0===t.startsWith("|")){const o=t.lastIndexOf("|"),a=[`@media (${t.slice(1,o)}) {`,`${`&${t.slice(o+1)}`} {`,...r,"}","}"].join("\n");return e.push(a),e}return e.push(`${t} {\n${r.join("\n")}\n}`),e}),[]),p=(e,t="ws.custom")=>(r,...n)=>{const s=a(r,...n),i=d(s).map((t=>t.replaceAll("&",e))),l=`@layer ${t} { ${i.join("\n")} }`;o.sheet.insertRule(l)};const h={attr:"ws-x",origin:"https://wind-cdn.axel669.net",...window.wsConfig,version:"1.0.0-beta.1",fontVersion:"2",iconVersion:"3.34.0"},u={},f=async(e,t)=>{const r=u[t],o=`ws-icon-${t}`;if(void 0!==r){if(await r.loaded,"loaded"!==r.status||null===e)return;return void e.style.setProperty("--icon-font",o)}const a=new FontFace(o,`url(${h.origin}/icon/${t}.woff?v${h.iconVersion})`);u[t]=a;try{await a.load()}catch(e){console.error(e)}document.fonts.add(a),f(e,t)},g=e=>{if(void 0===e.tagName)return;const t=e.dataset.icon??null;null!==t&&f(e,t)},b={childList(e){0!==e.addedNodes.length&&e.addedNodes.forEach((e=>{if(void 0===e.tagName)return;[e,...e.querySelectorAll("*")].forEach(g)}))},attributes(e){g(e.target)}};new MutationObserver((e=>e.forEach((e=>b[e.type](e))))).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-icon"]});const m=(...e)=>{for(const t of e)f(null,t)};c("appr")`*apperance: %arg; *-webkit-appearance: %arg;`,c("area")`*grid-area: %arg;`,c("b")`*border: %arg;`,c("b.b")`*border-bottom: %arg;`,c("b.b.c")`*border-bottom-color: %arg;`,c("b.b.s")`*border-bottom-style: %arg;`,c("b.b.w")`*border-bottom-width: %arg;`,c("b.c")`*border-color: %arg;`,c("b.l")`*border-left: %arg;`,c("b.l.c")`*border-left-color: %arg;`,c("b.l.s")`*border-left-style: %arg;`,c("b.l.w")`*border-left-width: %arg;`,c("b.r")`*border-right: %arg;`,c("b.r.c")`*border-right-color: %arg;`,c("b.r.s")`*border-right-style: %arg;`,c("b.r.w")`*border-right-width: %arg;`,c("b.s")`*border-style: %arg;`,c("b.t")`*border-top: %arg;`,c("b.t.c")`*border-top-color: %arg;`,c("b.t.s")`*border-top-style: %arg;`,c("b.t.w")`*border-top-width: %arg;`,c("b.w")`*border-width: %arg;`,c("b.x")`*border-left: %arg; *border-right: %arg;`,c("b.x.c")`*border-left-color: %arg; *border-right-color: %arg;`,c("b.x.s")`*border-left-style: %arg; *border-right-style: %arg;`,c("b.x.w")`*border-left-width: %arg; *border-right-width: %arg;`,c("b.y")`*border-top: %arg; *border-bottom: %arg;`,c("b.y.c")`*border-top-color: %arg; *border-bottom-color: %arg;`,c("b.y.s")`*border-top-style: %arg; *border-bottom-style: %arg;`,c("b.y.w")`*border-top-width: %arg; *border-bottom-width: %arg;`,c("bg")`*background: %arg;`,c("bg.att")`*background-attachment: %arg;`,c("bg.c")`*background-color: %arg;`,c("bg.img")`*background-image: %arg;`,c("bg.pos")`*background-position: %arg;`,c("bg.rep")`*background-repeat: %arg;`,c("bg.sz")`*background-size: %arg;`,c("c")`*color: %arg;`,c("col")`*grid-column: %arg;`,c("cur")`*cursor: %arg;`,c("disp")`*display: %arg;`,c("fl.basis")`*flex-basis: %arg;`,c("fl.cross")`*align-items: %arg;`,c("fl.dir")`*flex-direction: %arg;`,c("fl.flow")`*flex-flow: %arg;`,c("fl.grow")`*flex-grow: %arg;`,c("fl.main")`*justify-content: %arg;`,c("fl.shrink")`*flex-shrink: %arg;`,c("fl.size")`*flex: %arg;`,c("fl.wr")`*flex-wrap: %arg;`,c("font")`*font-family: %arg;`,c("gap")`*gap: %arg;`,c("gap.col")`*column-gap: %arg;`,c("gap.row")`*row-gap: %arg;`,c("gr.areas")`*grid-template-areas: %arg;`,c("gr.cols")`*grid-template-columns: %arg;`,c("gr.cols.a")`*grid-auto-columns: %arg;`,c("gr.flow")`*grid-auto-flow: %arg;`,c("gr.rows")`*grid-template-rows: %arg;`,c("gr.rows.a")`*grid-auto-rows: %arg;`,c("h")`*height: %arg;`,c("h.max")`*max-height: %arg;`,c("h.min")`*min-height: %arg;`,c("inset")`*top: %arg; *left: %arg; *bottom: %arg; *right: %arg;`,c("inset.x")`*left: %arg; *right: %arg;`,c("inset.y")`*top: %arg; *bottom: %arg;`,c("m")`*margin: %arg;`,c("m.b")`*margin-bottom: %arg;`,c("m.l")`*margin-left: %arg;`,c("m.r")`*margin-right: %arg;`,c("m.t")`*margin-top: %arg;`,c("m.x")`*margin-left: %arg; *margin-right: %arg;`,c("m.y")`*margin-bottom: %arg; *margin-top: %arg;`,c("o")`*opacity: %arg;`,c("outln")`*outline: %arg;`,c("over")`*overflow: %arg;`,c("over.x")`*overflow-x: %arg;`,c("over.y")`*overflow-y: %arg;`,c("p")`*padding: %arg;`,c("p.b")`*padding-bottom: %arg;`,c("p.l")`*padding-left: %arg;`,c("p.r")`*padding-right: %arg;`,c("p.t")`*padding-top: %arg;`,c("p.x")`*padding-left: %arg; *padding-right: %arg;`,c("p.y")`*padding-top: %arg; *padding-bottom: %arg;`,c("pos")`*position: %arg;`,c("pos.abs")`*position: absolute;`,c("pos.fix")`*position: fixed;`,c("pos.rel")`*position: relative;`,c("pos.stick")`*position: sticky;`,c("r")`*border-radius: %arg;`,c("r.b")`*border-bottom-left-radius: %arg; *border-bottom-right-radius: %arg;`,c("r.bl")`*border-bottom-left-radius: %arg;`,c("r.br")`*border-bottom-right-radius: %arg;`,c("r.l")`*border-top-left-radius: %arg; *border-bottom-left-radius: %arg;`,c("r.r")`*border-top-right-radius: %arg; *border-bottom-right-radius: %arg;`,c("r.t")`*border-top-left-radius: %arg; *border-top-right-radius: %arg;`,c("r.tl")`*border-top-left-radius: %arg;`,c("r.tr")`*border-top-right-radius: %arg;`,c("row")`*grid-row: %arg;`,c("sel")`*user-select: %arg;`,c("self.cross")`*align-self: %arg;`,c("self.main")`*justify-self: %arg;`,c("sh.box")`*box-shadow: %arg;`,c("sh.text")`*text-shadow: %arg;`,c("t.a")`*text-align: %arg;`,c("t.br")`*word-break: %arg;`,c("t.c")`*color: %arg;`,c("t.deco")`*text-decoration: %arg;`,c("t.lh")`*line-height: %arg;`,c("t.over")`*text-overflow: %arg;`,c("t.st")`*font-style: %arg;`,c("t.sz")`*font-size: %arg;`,c("t.tf")`*text-transform: %arg;`,c("t.var")`*font-variant: %arg;`,c("t.wrap")`*word-wrap: %arg;`,c("t.ws")`*white-space: %arg;`,c("t.wt")`*font-weight: %arg;`,c("tf")`*transform: %arg;`,c("tf.o")`*transform-origin: %arg;`,c("tf.p")`*perspective: %arg;`,c("tr")`*transition: %arg;`,c("v.a")`*vertical-align: %arg;`,c("vis")`*visibility: %arg;`,c("w")`*width: %arg;`,c("w.max")`*max-width: %arg;`,c("w.min")`*min-width: %arg;`,c("x")`*left: %arg;`,c("-x")`*right: %arg;`,c("y")`*top: %arg;`,c("-y")`*bottom: %arg;`,c("z")`*z-index: %arg;`,c("fl.cn")`fl.cross: center; fl.main: center;`,c("fl.cn.cross")`fl.cross: center;`,c("fl.cn.main")`fl.main: center;`,c("flex")`disp: flex; fl.dir: %arg;`,c("grid")`disp: grid; gr.flow: %arg;`,c("hide")`disp: none;`,c("invis")`vis: hidden;`,c("sticky")`pos: sticky; y: 0px; z: +1;`,c("adorn")`disp: flex; fl.cn; p: 4px;`,c("pad.compact")`p: 0px 4px;`,c("variant.outline")`b.w: 1px;`,c("variant.fill")`@text-color: @alt-color; @fill-color: @core-color; @active: @alt-color;`,c("variant.lined")`b.w: 0px; b.b.w: @border-size; r.b: 0px;`,c("gr.cols-fit")`*grid-template-columns: repeat(auto-fit, minmax(%arg));`,c("gr.cols-fill")`*grid-template-columns: repeat(auto-fill, minmax(%arg));`,c("text.subtitle")`t.sz: @text-size-subtitle; flex; fl.main: center; p: 0px 8px;`,c("text.title")`t.sz: @text-size-title; flex; fl.main: center; p: 4px 8px;`,c("elevate")`sh.box: 0px 2px 3px @shadow-color;`,c("#animate")`
2
2
  @modal-transition: visibility @anim-time linear;
3
3
  ! & ws-dialog {
4
4
  o: 0;
@@ -123,49 +123,35 @@ var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>
123
123
  --color: var(--primary);
124
124
  --core-color: hsl(var(--color), var(--layer-element));
125
125
  --alt-color: hsl(var(--color), var(--layer-border));
126
- --size: 100px;
127
- display: inline;
126
+ --size: 200px;
128
127
  }
129
- @keyframes spin {
130
- from {
128
+ svg {
129
+ width: var(--size);
130
+ height: var(--size);
131
+ }
132
+ @keyframes turn {
133
+ 0% {
131
134
  transform: rotate(0deg);
132
135
  }
133
- to {
136
+ 100% {
134
137
  transform: rotate(360deg);
135
138
  }
136
139
  }
137
140
  circle {
138
- animation-name: spin;
141
+ animation-name: turn;
142
+ animation-duration: calc(1000ms * var(--n));
139
143
  animation-iteration-count: infinite;
140
- animation-timing-function: linear;
141
- transform-origin: 50% 50%;
142
- stroke: var(--core-color);
143
- }
144
- circle.mid {
145
- stroke: var(--alt-color);
146
- }
147
- circle:nth-child(1) {
148
- animation-duration: 4s;
149
- }
150
- circle:nth-child(2) {
151
- animation-duration: 3s;
152
- animation-direction: reverse;
153
- }
154
- circle:nth-child(3) {
155
- animation-duration: 2s;
156
- }
157
-
158
- svg {
159
- display: inline-block;
160
- width: var(--size);
161
- height: var(--size);
144
+ animation-timing-function: ease;
145
+ stroke: var(--c);
146
+ stroke-width: 6;
147
+ fill: none;
148
+ animation-direction: var(--anim);
162
149
  }
163
150
  </style>
164
-
165
- <svg viewBox="0 0 100 100">
166
- <circle cx="50" cy="50" stroke-width="4" fill="transparent" r="48" stroke-dasharray="0 37.7 75.4 75.4 75.4 75.4"></circle>
167
- <circle class="mid" cx="50" cy="50" stroke-width="4" fill="transparent" r="40" stroke-dasharray="0 31.4 62.83 62.83 62.83 62.83"></circle>
168
- <circle cx="50" cy="50" stroke-width="4" fill="transparent" r="32" stroke-dasharray="0 12.57 25.13 25.13 25.13 25.13 25.13 25.13 25.13 25.13"></circle>
151
+ <svg viewbox="-50 -50 100 100">
152
+ <circle style="--c: var(--core-color);--o: 1; --anim: forward; --n: 2.5;" cx=0 cy=0 r=45 stroke-dasharray="45 45"></circle>
153
+ <circle style="--c: var(--alt-color);--o: 0.5; --anim: reverse; --n: 2;" cx=0 cy=0 r=35 stroke-dasharray="35 35"></circle>
154
+ <circle style="--c: var(--core-color);--o: 0.75; --anim: forward; --n: 3.5;" cx=0 cy=0 r=25 stroke-dasharray="25 25"></circle>
169
155
  </svg>
170
156
  `;customElements.define("ws-circle-spinner",class extends HTMLElement{constructor(){super();this.attachShadow({mode:"closed"}).appendChild($())}});const A=z`
171
157
  <style>
@@ -173,55 +159,68 @@ var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>
173
159
  --color: var(--primary);
174
160
  --core-color: hsl(var(--color), var(--layer-element));
175
161
  --alt-color: hsl(var(--color), var(--layer-border));
176
- --size: 100px;
177
- display: inline;
162
+ --size: 200px;
178
163
  }
179
- @keyframes spin {
180
- from {
181
- transform: rotateY(0deg);
182
- }
183
- to {
184
- transform: rotateY(360deg);
185
- }
164
+ svg {
165
+ width: var(--size);
166
+ height: var(--size);
186
167
  }
187
- path {
188
- animation-name: spin;
168
+ circle {
169
+ stroke-width: 0;
170
+ fill: var(--c);
171
+ offset-path: path("M 0 -45 L 39 -22.5 L 39 22.5 L 0 45 L -39 22.5 L -39 -22.5 L 0 -45");
172
+ animation-name: mover;
173
+ animation-duration: 3000ms;
189
174
  animation-iteration-count: infinite;
190
175
  animation-timing-function: linear;
191
- transform-origin: 50% 50%;
192
- stroke: var(--core-color);
193
- }
194
- path.mid {
195
- stroke: var(--alt-color);
196
176
  }
197
- path:nth-child(1) {
198
- animation-duration: 3s;
199
- }
200
- path:nth-child(2) {
201
- animation-duration: 2s;
202
- animation-direction: reverse;
177
+ @keyframes mover {
178
+ 0% {
179
+ offset-distance: 0%;
180
+ }
181
+ 100% {
182
+ offset-distance: 100%;
183
+ }
203
184
  }
204
- path:nth-child(3) {
205
- animation-duration: 1s;
185
+ @keyframes trail {
186
+ 0% {
187
+ stroke-dashoffset: 0;
188
+ }
189
+ 100% {
190
+ stroke-dashoffset: var(--len);
191
+ }
206
192
  }
207
-
208
- svg {
209
- display: inline-block;
210
- width: var(--size);
211
- height: var(--size);
193
+ path {
194
+ animation-name: trail;
195
+ animation-duration: 3000ms;
196
+ animation-iteration-count: infinite;
197
+ animation-timing-function: linear;
198
+ stroke: var(--c);
199
+ stroke-width: 6;
200
+ fill: none;
201
+ animation-direction: var(--anim);
212
202
  }
213
203
  </style>
214
-
215
- <svg viewBox="0 0 100 100">
216
- <path stroke-width="4" fill="none" d="M91.57 26v48L50 98 8.43 74V26L50 2l41.57 24Z"></path>
217
- <path stroke-width="4" class="mid" fill="none" d="M81.177 32v36L50 86 18.823 68V32L50 14l31.177 18Z"></path>
218
- <path stroke-width="4" fill="none" d="M70.785 38v24L50 74 29.215 62V38L50 26l20.785 12Z"></path>
204
+ <svg viewbox="-50 -50 100 100">
205
+ <path
206
+ d="M 0 -36 L 31 -18 L 31 18 L 0 36 L -31 18 L -31 -18 L 0 -36 Z"
207
+ style="--c: var(--alt-color); --len: 216;"
208
+ stroke-dasharray="36 36"
209
+ />
210
+ <path
211
+ d="M 0 -22.5 L 19.5 -11.25 L 19.5 11.25 L 0 22.5 L -19.5 11.25 L -19.5 -11.25 L 0 -22.5 Z"
212
+ style="--c: var(--core-color); --anim: reverse; --len: 135;"
213
+ stroke-dasharray="22.5 22.5"
214
+ />
215
+ <circle r="3" style="--c: var(--core-color); animation-delay: -250ms;"/>
216
+ <circle r="3" style="--c: var(--core-color); animation-delay: -1250ms;" />
217
+ <circle r="3" style="--c: var(--core-color); animation-delay: -2250ms;" />
219
218
  </svg>
220
- `;customElements.define("ws-hexagon-spinner",class extends HTMLElement{constructor(){super();this.attachShadow({mode:"closed"}).appendChild(A())}});var E=(e,t)=>`\n @core: ${e};\n @alt: ${t};\n @core-color: hsl(@color, @core);\n @alt-color: hsl(@color, @alt);\n\n @fill: var(--fill-color, transparent);\n @text: var(--text-color, @core-color);\n @active: @text;\n`;p("ws-avatar")`
219
+ `;customElements.define("ws-hexagon-spinner",class extends HTMLElement{constructor(){super();this.attachShadow({mode:"closed"}).appendChild(A())}});var L=(e,t)=>`\n @core: ${e};\n @alt: ${t};\n @core-color: hsl(@color, @core);\n @alt-color: hsl(@color, @alt);\n\n @fill: var(--fill-color, transparent);\n @text: var(--text-color, @core-color);\n @active: @text;\n`;p("ws-avatar")`
221
220
  @color: @mono;
222
221
  @size: 36px;
223
222
 
224
- ${E("@layer-element","@layer-fill")}
223
+ ${L("@layer-element","@layer-fill")}
225
224
 
226
225
  disp: inline-flex;
227
226
  over: hidden;
@@ -247,7 +246,7 @@ var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>
247
246
  `,p("ws-badge")`
248
247
  @color: @primary;
249
248
 
250
- ${E("@layer-element","@layer-fill")}
249
+ ${L("@layer-element","@layer-fill")}
251
250
 
252
251
  pos: relative;
253
252
  disp: inline-grid;
@@ -273,10 +272,10 @@ var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>
273
272
  z: @z-info;
274
273
  t.wt: 600;
275
274
  }
276
- `;var L='\n over: hidden;\n pos: relative;\n cur: pointer;\n\n ! &::after {\n *content: "";\n pos: absolute;\n y: 0px;\n x: 0px;\n -y: 0px;\n -x: 0px;\n *pointer-events: none;\n o: 0;\n bg.c: @active;\n tr: opacity @anim-time linear;\n }\n ! &:where(:not(:disabled)):active::after {\n tr: none;\n o: 0.3;\n }\n',S='\n over: hidden;\n pos: relative;\n\n ! |pointer: fine| {\n ! &::before {\n *content: "";\n pos: absolute;\n y: 0px;\n x: 0px;\n -y: 0px;\n -x: 0px;\n *pointer-events: none;\n o: 0;\n bg.c: @active;\n }\n ! &:where(:not(:disabled)):hover::before {\n tr: none;\n o: 0.1;\n }\n }\n';p(":where(button[data-ws], a[data-ws][button], label[data-ws][button])")`
275
+ `;var E='\n over: hidden;\n pos: relative;\n cur: pointer;\n\n ! &::after {\n *content: "";\n pos: absolute;\n y: 0px;\n x: 0px;\n -y: 0px;\n -x: 0px;\n *pointer-events: none;\n o: 0;\n bg.c: @active;\n tr: opacity @anim-time linear;\n }\n ! &:where(:not(:disabled)):active::after {\n tr: none;\n o: 0.3;\n }\n',S='\n over: hidden;\n pos: relative;\n\n ! |pointer: fine| {\n ! &::before {\n *content: "";\n pos: absolute;\n y: 0px;\n x: 0px;\n -y: 0px;\n -x: 0px;\n *pointer-events: none;\n o: 0;\n bg.c: @active;\n }\n ! &:where(:not(:disabled)):hover::before {\n tr: none;\n o: 0.1;\n }\n }\n';p(":where(button[data-ws], a[data-ws][button], label[data-ws][button])")`
277
276
  @color: @primary;
278
277
 
279
- ${E("@layer-element","@layer-fill")}
278
+ ${L("@layer-element","@layer-fill")}
280
279
 
281
280
  pos: relative;
282
281
 
@@ -302,11 +301,11 @@ var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>
302
301
  }
303
302
 
304
303
  ${S}
305
- ${L}
304
+ ${E}
306
305
  `,p("ws-chip")`
307
306
  @color: @mono;
308
307
 
309
- ${E("@layer-element","@layer-fill")}
308
+ ${L("@layer-element","@layer-fill")}
310
309
 
311
310
  disp: inline-flex;
312
311
  fl.cross: center;
@@ -321,7 +320,7 @@ var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>
321
320
 
322
321
  ! &[clickable] {
323
322
  cur: pointer;
324
- ${L}
323
+ ${E}
325
324
  }
326
325
  `,p("label[control][data-ws]")`
327
326
  @color: @primary;
@@ -397,7 +396,7 @@ var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>
397
396
  @color: @primary;
398
397
  @padding: 8px;
399
398
 
400
- ${E("@layer-element","@layer-fill")}
399
+ ${L("@layer-element","@layer-fill")}
401
400
 
402
401
  b: 0px solid @core-color;
403
402
  p: 0px @padding;
@@ -532,7 +531,7 @@ var ws=function(e){"use strict";const t=Symbol("no match"),r=(e,r)=>{const o=r=>
532
531
  `;customElements.define("ws-modal",class extends HTMLElement{#e=null;constructor(){super(),this.#e=this.attachShadow({mode:"closed",delegatesFocus:!0}),this.#e.append(M())}connectedCallback(){window.addEventListener("keydown",(e=>{!0!==(!1===this.open||"Escape"!==e.key||!0===this.persistent)&&(this.hide(),this.dispatchEvent(new Event("close")))}));this.#e.querySelector("ws-modal-overlay").addEventListener("click",(e=>{!0!==this.persistent&&(this.hide(),this.dispatchEvent(new Event("close")))}))}get open(){return this.hasAttribute("open")}set open(e){!1!==e?this.setAttribute("open",""):this.removeAttribute("open")}get persistent(){return this.hasAttribute("persistent")}set persistent(e){!1!==e?this.setAttribute("persistent",""):this.removeAttribute("persistent")}show(){this.open=!0}hide(){this.open=!1}}),p("ws-paper")`
533
532
  @color: @mono;
534
533
 
535
- ${E("@layer-surface","@layer-border")}
534
+ ${L("@layer-surface","@layer-border")}
536
535
 
537
536
  disp: grid;
538
537
  r: @base-radius;
@@ -641,8 +640,8 @@ div::after {
641
640
  ! & > :where(*) {
642
641
  area: content;
643
642
  }
644
- `;const V="caret-down-filled";m(V),p("ws-option")`
645
- ${E("@layer-element","@layer-fill")}
643
+ `;const I="caret-down-filled";m(I),p("ws-option")`
644
+ ${L("@layer-element","@layer-fill")}
646
645
 
647
646
  disp: block;
648
647
  p: 8px;
@@ -660,7 +659,7 @@ div::after {
660
659
  }
661
660
 
662
661
  ${S}
663
- ${L}
662
+ ${E}
664
663
  `,p("ws-optgroup")`
665
664
  grid;
666
665
  gr.cols: 16px 1fr;
@@ -677,7 +676,7 @@ div::after {
677
676
  ! & > * {
678
677
  col: 2;
679
678
  }
680
- `;const I=z`
679
+ `;const T=z`
681
680
  <style>
682
681
  :host {
683
682
  --color: var(--mono);
@@ -758,7 +757,7 @@ div::after {
758
757
  }
759
758
  ws-sel-caret::before {
760
759
  display: block;
761
- font-family: ws-icon-${V};
760
+ font-family: ws-icon-${I};
762
761
  content: attr(data-icon);
763
762
  }
764
763
  slot[name="selected"] {
@@ -787,7 +786,7 @@ div::after {
787
786
  <ws-selected>No Selection</ws-selected>
788
787
  </slot>
789
788
  <slot name="display"></slot>
790
- <ws-sel-caret data-icon="${V}"></ws-sel-caret>
789
+ <ws-sel-caret data-icon="${I}"></ws-sel-caret>
791
790
  </value-display>
792
791
  <ws-popover>
793
792
  <slot slot="popover" name="options">
@@ -796,7 +795,7 @@ div::after {
796
795
  </ws-options>
797
796
  </slot>
798
797
  </ws-popover>
799
- `,T="ws-option";customElements.define("ws-select",class extends HTMLElement{static formAssociated=!0;#a=null;#n=-1;#s=null;#i=null;#l=null;#c=null;#e=null;#d=null;#p(){return[...this.querySelectorAll(T)]}#h(e){const t=Array.from(e,(e=>[...e.addedNodes])).flat();if(!1===t.some((e=>e.tagName?.toLowerCase()===T)))return;const r=t.findLast((e=>e.tagName?.toLowerCase()===T&&!0===e.hasAttribute("selected")))??this.#s,o=this.#p();for(const e of o)e.removeAttribute("selected");this.selectedIndex=o.indexOf(r),this.updatePreview()}constructor(){super(),this.#e=this.attachShadow({mode:"closed",delegatesFocus:!0}),this.#e.append(I()),this.#c=this.#e.querySelector("slot[name=selected]"),this.#l=this.#e.querySelector("ws-popover"),this.#d=this.#e.querySelector("value-display"),this.#l.sizeTarget=this,this.removeAttribute("open"),this.display=document.createElement("ws-display"),this.display.slot="display"}connectedCallback(){this.insertBefore(this.display,this.firstChild),this.updatePreview(),this.tabIndex=this.getAttribute("tabindex")??"0";const e=new MutationObserver(this.#h.bind(this));e.observe(this,{childList:!0,subtree:!0}),this.#i=e,this.role="combobox",this.addEventListener("click",(()=>{this.open(),this.#d.focus()}),{passive:!0}),this.#l.addEventListener("close",(()=>this.close())),this.#l.addEventListener("pointerdown",(e=>e.preventDefault())),this.#l.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()})),this.#e.querySelector("slot[name='options']").addEventListener("pointerdown",(e=>e.preventDefault())),this.#e.querySelector("slot[name='options']").addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault();const t=e.target.tagName?.toLowerCase();"ws-option"===t&&(this.selectedIndex=this.#p().indexOf(e.target),this.close(),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new Event("input",{bubbles:!0})))}))}disconnectedCallback(){this.#i.disconnect()}get value(){return this.#a}set value(e){if(this.#a=e,null===e)return void(this.selectedIndex=-1);const t=this.#p(),r=t.find((t=>t.value===e||t.getAttribute("value")===e));this.selectedIndex=t.indexOf(r)}get selectedIndex(){return this.#n}set selectedIndex(e){this.#s?.removeAttribute("selected");const t=this.#p(),r=Math.min(e,t.length);this.#s=t[r]??null,this.#n=r,this.#s?.setAttribute("selected",""),this.#a=this.#s?.value??this.#s?.getAttribute("value")??this.#a,this.updatePreview()}updatePreview(){const e=this.querySelector("[slot=selected]")??this.#c;this.display.innerHTML=e.innerHTML,this.display.querySelector("ws-selected").innerHTML=this.#s?.getAttribute("preview")??this.#s?.innerHTML??this.getAttribute("blank")??"No Selection"}toggle(){null!==this.getAttribute("open")?this.close():this.open()}open(){this.setAttribute("open","");const e=this.querySelector("ws-options")??this.#e.querySelector("ws-options"),t=e.getBoundingClientRect();e.style.setProperty("--opt-h",`${t.height}px`),e.style.setProperty("--opt-w",`${t.width}px`),this.#l.show(),e.scrollTop=0,this.#s?.scrollIntoView()}close(){this.removeAttribute("open"),this.#l.hide()}__childValueMatch(e){const t=this.#p().indexOf(e);this.selectedIndex=t}}),p("table[data-ws]")`
798
+ `,V="ws-option";customElements.define("ws-select",class extends HTMLElement{static formAssociated=!0;#a=null;#n=-1;#s=null;#i=null;#l=null;#c=null;#e=null;#d=null;#p(){return[...this.querySelectorAll(V)]}#h(e){const t=Array.from(e,(e=>[...e.addedNodes])).flat();if(!1===t.some((e=>e.tagName?.toLowerCase()===V)))return;const r=t.findLast((e=>e.tagName?.toLowerCase()===V&&!0===e.hasAttribute("selected")))??this.#s,o=this.#p();for(const e of o)e.removeAttribute("selected");this.selectedIndex=o.indexOf(r),this.updatePreview()}constructor(){super(),this.#e=this.attachShadow({mode:"closed",delegatesFocus:!0}),this.#e.append(T()),this.#c=this.#e.querySelector("slot[name=selected]"),this.#l=this.#e.querySelector("ws-popover"),this.#d=this.#e.querySelector("value-display"),this.#l.sizeTarget=this,this.removeAttribute("open"),this.display=document.createElement("ws-display"),this.display.slot="display"}connectedCallback(){this.insertBefore(this.display,this.firstChild),this.updatePreview(),this.tabIndex=this.getAttribute("tabindex")??"0";const e=new MutationObserver(this.#h.bind(this));e.observe(this,{childList:!0,subtree:!0}),this.#i=e,this.role="combobox",this.addEventListener("click",(()=>{this.open(),this.#d.focus()}),{passive:!0}),this.#l.addEventListener("close",(()=>this.close())),this.#l.addEventListener("pointerdown",(e=>e.preventDefault())),this.#l.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()})),this.#e.querySelector("slot[name='options']").addEventListener("pointerdown",(e=>e.preventDefault())),this.#e.querySelector("slot[name='options']").addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault();const t=e.target.tagName?.toLowerCase();"ws-option"===t&&(this.selectedIndex=this.#p().indexOf(e.target),this.close(),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new Event("input",{bubbles:!0})))}))}disconnectedCallback(){this.#i.disconnect()}get value(){return this.#a}set value(e){if(this.#a=e,null===e)return void(this.selectedIndex=-1);const t=this.#p(),r=t.find((t=>t.value===e||t.getAttribute("value")===e));this.selectedIndex=t.indexOf(r)}get selectedIndex(){return this.#n}set selectedIndex(e){this.#s?.removeAttribute("selected");const t=this.#p(),r=Math.min(e,t.length);this.#s=t[r]??null,this.#n=r,this.#s?.setAttribute("selected",""),this.#a=this.#s?.value??this.#s?.getAttribute("value")??this.#a,this.updatePreview()}updatePreview(){const e=this.querySelector("[slot=selected]")??this.#c;this.display.innerHTML=e.innerHTML,this.display.querySelector("ws-selected").innerHTML=this.#s?.getAttribute("preview")??this.#s?.innerHTML??this.getAttribute("blank")??"No Selection"}toggle(){null!==this.getAttribute("open")?this.close():this.open()}open(){this.setAttribute("open","");const e=this.querySelector("ws-options")??this.#e.querySelector("ws-options"),t=e.getBoundingClientRect();e.style.setProperty("--opt-h",`${t.height}px`),e.style.setProperty("--opt-w",`${t.width}px`),this.#l.show(),e.scrollTop=0,this.#s?.scrollIntoView()}close(){this.removeAttribute("open"),this.#l.hide()}__childValueMatch(e){const t=this.#p().indexOf(e);this.selectedIndex=t}}),p("table[data-ws]")`
800
799
  @color: @primary;
801
800
 
802
801
  *border-collapse: separate;
@@ -858,7 +857,7 @@ div::after {
858
857
  `,p("ws-tabs")`
859
858
  @color: @primary;
860
859
 
861
- ${E("@layer-element","@layer-fill")}
860
+ ${L("@layer-element","@layer-fill")}
862
861
 
863
862
  disp: grid;
864
863
  gr.cols.a: 1fr;
@@ -910,12 +909,12 @@ div::after {
910
909
  }
911
910
  }
912
911
 
913
- ${L}
912
+ ${E}
914
913
  `,p("ws-titlebar")`
915
914
  @border-size: 2px;
916
915
  @color: @primary;
917
916
 
918
- ${E("@layer-element","@layer-fill")}
917
+ ${L("@layer-element","@layer-fill")}
919
918
 
920
919
  disp: grid;
921
920
  h.min: 52px;
package/dist/ws-esm.js CHANGED
@@ -1,4 +1,4 @@
1
- const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===t.substr(N,o)?(N+=o,r):e},a=r=>()=>{const o=t.charAt(N);return!1!==r.test(o)?(N+=1,o):e};let n=null;const s=o("@"),i=o(":"),l=a(/[^;]/),c=o(";"),d=o("*"),p=a(/[a-z0-9_\-]/i),h=o("!"),u=a(/[^{]/),g=o("{"),b=o("}"),f=a(/[a-zA-Z0-9\.\-_#\^\$\/]/),m=o("#"),x=a(/[^;#]/),v=a(/[\s]/m),w=()=>{const t=N;let r=null,o=null;return(r=P())===e||(o=z())===e?(N=t,e):[r,o]},y=()=>{const r=N;let o=null,a=null;return(o=m())===e||(a=(()=>{const r=N,o=N;for(;x()!==e;);return N-o==0?e:t.slice(r,N)})())===e?(N=r,e):[o,a]},k=()=>{n="rules";let t=N,r=null;const o=[];let a=null;for(;(a=w())!==e;)o.push(a);if(r=o,P()===e)return N=t,e;return r.map((e=>e[1]))},z=()=>{let t=null;return(t=$())!==e||(t=A())!==e||(t=E())!==e||(t=L())!==e?t:e},$=()=>{n="rule$0";let t=N,r=null;if((r=S())===e)return N=t,e;return r},A=()=>{n="rule$1";let t=N,r=null;if((r=q())===e)return N=t,e;return r},E=()=>{n="rule$2";let t=N,r=null;if((r=C())===e)return N=t,e;return r},L=()=>{n="rule$3";let t=N,r=null;if((r=V())===e)return N=t,e;return r},S=()=>{n="variable";let r=N,o=null,a=null;if(s()===e)return N=r,e;if((o=M())===e)return N=r,e;if(i()===e)return N=r,e;if(P()===e)return N=r,e;if((a=(()=>{const r=N,o=N;for(;l()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;if(c()===e)return N=r,e;return((e,t)=>({type:"var",name:e,value:t}))(o,a)},q=()=>{n="css";let r=N,o=null,a=null;if(d()===e)return N=r,e;if((o=M())===e)return N=r,e;if(i()===e)return N=r,e;if(P()===e)return N=r,e;if((a=(()=>{const r=N,o=N;for(;l()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;if(c()===e)return N=r,e;return((e,t)=>({type:"css",name:e,value:t}))(o,a)},M=()=>{n="cssName";let r=N,o=null;if((o=(()=>{const r=N,o=N;for(;p()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;return o},C=()=>{n="subrule";let r=N,o=null,a=null;if(h()===e)return N=r,e;if(P()===e)return N=r,e;if((o=(()=>{const r=N,o=N;for(;u()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;if(g()===e)return N=r,e;if((a=k())===e)return N=r,e;if(b()===e)return N=r,e;var s;return s=a,{type:"alt",selector:o.trim(),rules:s}},V=()=>{n="macro";let r=N,o=null,a=null;if((o=(()=>{const r=N,o=N;for(;f()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;const s=(()=>{const t=N;let r=null,o=null,a=null;return(r=i())===e||(o=P())===e||(a=T())===e?(N=t,e):[r,o,a]})();if(a=s===e?null:s,c()===e)return N=r,e;return((e,t)=>({type:"macro",name:e,value:t?.[2]}))(o,a)},T=()=>{let t=null;return(t=I())!==e||(t=j())!==e?t:e},I=()=>{n="macroValue$0";let t=null;const r=[];let o=null;for(;(o=y())!==e;)r.push(o);if(0===r.length)return e;t=r;return(e=>{const t=e.map((e=>e[1].trim()));return t.arg=t.join(" "),t})(t)},j=()=>{n="macroValue$1";let r=N,o=null;if((o=(()=>{const r=N,o=N;for(;l()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;return(e=>{const t=[e.trim()];return t.arg=e,t})(o)},P=()=>{for(n="_";v()!==e;);};let N=0;const H=(()=>{n="$";let t=N,r=null;if((r=k())===e)return N=t,e;return r})();return N!==t.length?(console.log("last",n),console.log("@",N),console.log(t.slice(N-10,N+10)),new Error("End of input not found")):H},r=document.createElement("style");r.setAttribute("data-name","windstorm-generated"),r.innerHTML="@layer ws.custom ws.macro ws.user;",document.head.append(r);const o=(e,...r)=>{const o=String.raw(e,...r);return a(t(o),{"&":[]},"&")},a=(e,t,r)=>{for(const o of e)s(o,t,r);return t},n=e=>e.replace(/@([a-zA-Z0-9\-_]+)/g,((e,t)=>`var(--${t})`)),s=(e,t,r)=>{if("var"===e.type)return void t[r].push(`--${e.name}: ${n(e.value)};`);if("css"===e.type)return void t[r].push(`${e.name}: ${n(e.value)};`);if("macro"===e.type){const o=i[e.name];if(void 0===o)return void console.warn(`no macro for "${e.name}"`);for(const[a,s]of Object.entries(o)){const o=a.replace("&",r);t[o]=t[o]??[],t[o].push(...s.map((t=>n(t.replace(/%(arg|\d+)/g,((t,r)=>e.value?.[r]??""))))))}return}const o=e.selector.replaceAll("&",r);t[o]=[...t[o]??[]],a(e.rules,t,o)},i={},l=e=>(t,...r)=>i[e]=o(t,...r),c=e=>Object.entries(e).reduce(((e,[t,r])=>{if(!0===t.startsWith("|")){const o=t.lastIndexOf("|"),a=[`@media (${t.slice(1,o)}) {`,`${`&${t.slice(o+1)}`} {`,...r,"}","}"].join("\n");return e.push(a),e}return e.push(`${t} {\n${r.join("\n")}\n}`),e}),[]),d=(e,t="ws.custom")=>(a,...n)=>{const s=o(a,...n),i=c(s).map((t=>t.replaceAll("&",e))),l=`@layer ${t} { ${i.join("\n")} }`;r.sheet.insertRule(l)};const p={attr:"ws-x",origin:"https://wind-cdn.axel669.net",...window.wsConfig,version:"1.0.0-beta.0",fontVersion:"2",iconVersion:"3.34.0"},h={},u=async(e,t)=>{const r=h[t],o=`ws-icon-${t}`;if(void 0!==r){if(await r.loaded,"loaded"!==r.status||null===e)return;return void e.style.setProperty("--icon-font",o)}const a=new FontFace(o,`url(${p.origin}/icon/${t}.woff?v${p.iconVersion})`);h[t]=a;try{await a.load()}catch(e){console.error(e)}document.fonts.add(a),u(e,t)},g=e=>{if(void 0===e.tagName)return;const t=e.dataset.icon??null;null!==t&&u(e,t)},b={childList(e){0!==e.addedNodes.length&&e.addedNodes.forEach((e=>{if(void 0===e.tagName)return;[e,...e.querySelectorAll("*")].forEach(g)}))},attributes(e){g(e.target)}};new MutationObserver((e=>e.forEach((e=>b[e.type](e))))).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-icon"]});const f=(...e)=>{for(const t of e)u(null,t)};l("appr")`*apperance: %arg; *-webkit-appearance: %arg;`,l("area")`*grid-area: %arg;`,l("b")`*border: %arg;`,l("b.b")`*border-bottom: %arg;`,l("b.b.c")`*border-bottom-color: %arg;`,l("b.b.s")`*border-bottom-style: %arg;`,l("b.b.w")`*border-bottom-width: %arg;`,l("b.c")`*border-color: %arg;`,l("b.l")`*border-left: %arg;`,l("b.l.c")`*border-left-color: %arg;`,l("b.l.s")`*border-left-style: %arg;`,l("b.l.w")`*border-left-width: %arg;`,l("b.r")`*border-right: %arg;`,l("b.r.c")`*border-right-color: %arg;`,l("b.r.s")`*border-right-style: %arg;`,l("b.r.w")`*border-right-width: %arg;`,l("b.s")`*border-style: %arg;`,l("b.t")`*border-top: %arg;`,l("b.t.c")`*border-top-color: %arg;`,l("b.t.s")`*border-top-style: %arg;`,l("b.t.w")`*border-top-width: %arg;`,l("b.w")`*border-width: %arg;`,l("b.x")`*border-left: %arg; *border-right: %arg;`,l("b.x.c")`*border-left-color: %arg; *border-right-color: %arg;`,l("b.x.s")`*border-left-style: %arg; *border-right-style: %arg;`,l("b.x.w")`*border-left-width: %arg; *border-right-width: %arg;`,l("b.y")`*border-top: %arg; *border-bottom: %arg;`,l("b.y.c")`*border-top-color: %arg; *border-bottom-color: %arg;`,l("b.y.s")`*border-top-style: %arg; *border-bottom-style: %arg;`,l("b.y.w")`*border-top-width: %arg; *border-bottom-width: %arg;`,l("bg")`*background: %arg;`,l("bg.att")`*background-attachment: %arg;`,l("bg.c")`*background-color: %arg;`,l("bg.img")`*background-image: %arg;`,l("bg.pos")`*background-position: %arg;`,l("bg.rep")`*background-repeat: %arg;`,l("bg.sz")`*background-size: %arg;`,l("c")`*color: %arg;`,l("col")`*grid-column: %arg;`,l("cur")`*cursor: %arg;`,l("disp")`*display: %arg;`,l("fl.basis")`*flex-basis: %arg;`,l("fl.cross")`*align-items: %arg;`,l("fl.dir")`*flex-direction: %arg;`,l("fl.flow")`*flex-flow: %arg;`,l("fl.grow")`*flex-grow: %arg;`,l("fl.main")`*justify-content: %arg;`,l("fl.shrink")`*flex-shrink: %arg;`,l("fl.size")`*flex: %arg;`,l("fl.wr")`*flex-wrap: %arg;`,l("font")`*font-family: %arg;`,l("gap")`*gap: %arg;`,l("gap.col")`*column-gap: %arg;`,l("gap.row")`*row-gap: %arg;`,l("gr.areas")`*grid-template-areas: %arg;`,l("gr.cols")`*grid-template-columns: %arg;`,l("gr.cols.a")`*grid-auto-columns: %arg;`,l("gr.flow")`*grid-auto-flow: %arg;`,l("gr.rows")`*grid-template-rows: %arg;`,l("gr.rows.a")`*grid-auto-rows: %arg;`,l("h")`*height: %arg;`,l("h.max")`*max-height: %arg;`,l("h.min")`*min-height: %arg;`,l("inset")`*top: %arg; *left: %arg; *bottom: %arg; *right: %arg;`,l("inset.x")`*left: %arg; *right: %arg;`,l("inset.y")`*top: %arg; *bottom: %arg;`,l("m")`*margin: %arg;`,l("m.b")`*margin-bottom: %arg;`,l("m.l")`*margin-left: %arg;`,l("m.r")`*margin-right: %arg;`,l("m.t")`*margin-top: %arg;`,l("m.x")`*margin-left: %arg; *margin-right: %arg;`,l("m.y")`*margin-bottom: %arg; *margin-top: %arg;`,l("o")`*opacity: %arg;`,l("outln")`*outline: %arg;`,l("over")`*overflow: %arg;`,l("over.x")`*overflow-x: %arg;`,l("over.y")`*overflow-y: %arg;`,l("p")`*padding: %arg;`,l("p.b")`*padding-bottom: %arg;`,l("p.l")`*padding-left: %arg;`,l("p.r")`*padding-right: %arg;`,l("p.t")`*padding-top: %arg;`,l("p.x")`*padding-left: %arg; *padding-right: %arg;`,l("p.y")`*padding-top: %arg; *padding-bottom: %arg;`,l("pos")`*position: %arg;`,l("pos.abs")`*position: absolute;`,l("pos.fix")`*position: fixed;`,l("pos.rel")`*position: relative;`,l("pos.stick")`*position: sticky;`,l("r")`*border-radius: %arg;`,l("r.b")`*border-bottom-left-radius: %arg; *border-bottom-right-radius: %arg;`,l("r.bl")`*border-bottom-left-radius: %arg;`,l("r.br")`*border-bottom-right-radius: %arg;`,l("r.l")`*border-top-left-radius: %arg; *border-bottom-left-radius: %arg;`,l("r.r")`*border-top-right-radius: %arg; *border-bottom-right-radius: %arg;`,l("r.t")`*border-top-left-radius: %arg; *border-top-right-radius: %arg;`,l("r.tl")`*border-top-left-radius: %arg;`,l("r.tr")`*border-top-right-radius: %arg;`,l("row")`*grid-row: %arg;`,l("sel")`*user-select: %arg;`,l("self.cross")`*align-self: %arg;`,l("self.main")`*justify-self: %arg;`,l("sh.box")`*box-shadow: %arg;`,l("sh.text")`*text-shadow: %arg;`,l("t.a")`*text-align: %arg;`,l("t.br")`*word-break: %arg;`,l("t.c")`*color: %arg;`,l("t.deco")`*text-decoration: %arg;`,l("t.lh")`*line-height: %arg;`,l("t.over")`*text-overflow: %arg;`,l("t.st")`*font-style: %arg;`,l("t.sz")`*font-size: %arg;`,l("t.tf")`*text-transform: %arg;`,l("t.var")`*font-variant: %arg;`,l("t.wrap")`*word-wrap: %arg;`,l("t.ws")`*white-space: %arg;`,l("t.wt")`*font-weight: %arg;`,l("tf")`*transform: %arg;`,l("tf.o")`*transform-origin: %arg;`,l("tf.p")`*perspective: %arg;`,l("tr")`*transition: %arg;`,l("v.a")`*vertical-align: %arg;`,l("vis")`*visibility: %arg;`,l("w")`*width: %arg;`,l("w.max")`*max-width: %arg;`,l("w.min")`*min-width: %arg;`,l("x")`*left: %arg;`,l("-x")`*right: %arg;`,l("y")`*top: %arg;`,l("-y")`*bottom: %arg;`,l("z")`*z-index: %arg;`,l("fl.cn")`fl.cross: center; fl.main: center;`,l("fl.cn.cross")`fl.cross: center;`,l("fl.cn.main")`fl.main: center;`,l("flex")`disp: flex; fl.dir: %arg;`,l("grid")`disp: grid; gr.flow: %arg;`,l("hide")`disp: none;`,l("invis")`vis: hidden;`,l("sticky")`pos: sticky; y: 0px; z: +1;`,l("adorn")`disp: flex; fl.cn; p: 4px;`,l("pad.compact")`p: 0px 4px;`,l("variant.outline")`b.w: 1px;`,l("variant.fill")`@text-color: @alt-color; @fill-color: @core-color; @active: @alt-color;`,l("variant.lined")`b.w: 0px; b.b.w: @border-size; r.b: 0px;`,l("gr.cols-fit")`*grid-template-columns: repeat(auto-fit, minmax(%arg));`,l("gr.cols-fill")`*grid-template-columns: repeat(auto-fill, minmax(%arg));`,l("text.subtitle")`t.sz: @text-size-subtitle; flex; fl.main: center; p: 0px 8px;`,l("text.title")`t.sz: @text-size-title; flex; fl.main: center; p: 4px 8px;`,l("elevate")`sh.box: 0px 2px 3px @shadow-color;`,l("#animate")`
1
+ const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===t.substr(N,o)?(N+=o,r):e},a=r=>()=>{const o=t.charAt(N);return!1!==r.test(o)?(N+=1,o):e};let n=null;const s=o("@"),i=o(":"),l=a(/[^;]/),c=o(";"),d=o("*"),p=a(/[a-z0-9_\-]/i),h=o("!"),u=a(/[^{]/),g=o("{"),f=o("}"),b=a(/[a-zA-Z0-9\.\-_#\^\$\/]/),m=o("#"),x=a(/[^;#]/),v=a(/[\s]/m),w=()=>{const t=N;let r=null,o=null;return(r=P())===e||(o=z())===e?(N=t,e):[r,o]},y=()=>{const r=N;let o=null,a=null;return(o=m())===e||(a=(()=>{const r=N,o=N;for(;x()!==e;);return N-o==0?e:t.slice(r,N)})())===e?(N=r,e):[o,a]},k=()=>{n="rules";let t=N,r=null;const o=[];let a=null;for(;(a=w())!==e;)o.push(a);if(r=o,P()===e)return N=t,e;return r.map((e=>e[1]))},z=()=>{let t=null;return(t=$())!==e||(t=A())!==e||(t=L())!==e||(t=E())!==e?t:e},$=()=>{n="rule$0";let t=N,r=null;if((r=S())===e)return N=t,e;return r},A=()=>{n="rule$1";let t=N,r=null;if((r=q())===e)return N=t,e;return r},L=()=>{n="rule$2";let t=N,r=null;if((r=C())===e)return N=t,e;return r},E=()=>{n="rule$3";let t=N,r=null;if((r=T())===e)return N=t,e;return r},S=()=>{n="variable";let r=N,o=null,a=null;if(s()===e)return N=r,e;if((o=M())===e)return N=r,e;if(i()===e)return N=r,e;if(P()===e)return N=r,e;if((a=(()=>{const r=N,o=N;for(;l()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;if(c()===e)return N=r,e;return((e,t)=>({type:"var",name:e,value:t}))(o,a)},q=()=>{n="css";let r=N,o=null,a=null;if(d()===e)return N=r,e;if((o=M())===e)return N=r,e;if(i()===e)return N=r,e;if(P()===e)return N=r,e;if((a=(()=>{const r=N,o=N;for(;l()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;if(c()===e)return N=r,e;return((e,t)=>({type:"css",name:e,value:t}))(o,a)},M=()=>{n="cssName";let r=N,o=null;if((o=(()=>{const r=N,o=N;for(;p()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;return o},C=()=>{n="subrule";let r=N,o=null,a=null;if(h()===e)return N=r,e;if(P()===e)return N=r,e;if((o=(()=>{const r=N,o=N;for(;u()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;if(g()===e)return N=r,e;if((a=k())===e)return N=r,e;if(f()===e)return N=r,e;var s;return s=a,{type:"alt",selector:o.trim(),rules:s}},T=()=>{n="macro";let r=N,o=null,a=null;if((o=(()=>{const r=N,o=N;for(;b()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;const s=(()=>{const t=N;let r=null,o=null,a=null;return(r=i())===e||(o=P())===e||(a=I())===e?(N=t,e):[r,o,a]})();if(a=s===e?null:s,c()===e)return N=r,e;return((e,t)=>({type:"macro",name:e,value:t?.[2]}))(o,a)},I=()=>{let t=null;return(t=V())!==e||(t=j())!==e?t:e},V=()=>{n="macroValue$0";let t=null;const r=[];let o=null;for(;(o=y())!==e;)r.push(o);if(0===r.length)return e;t=r;return(e=>{const t=e.map((e=>e[1].trim()));return t.arg=t.join(" "),t})(t)},j=()=>{n="macroValue$1";let r=N,o=null;if((o=(()=>{const r=N,o=N;for(;l()!==e;);return N-o==0?e:t.slice(r,N)})())===e)return N=r,e;return(e=>{const t=[e.trim()];return t.arg=e,t})(o)},P=()=>{for(n="_";v()!==e;);};let N=0;const H=(()=>{n="$";let t=N,r=null;if((r=k())===e)return N=t,e;return r})();return N!==t.length?(console.log("last",n),console.log("@",N),console.log(t.slice(N-10,N+10)),new Error("End of input not found")):H},r=document.createElement("style");r.setAttribute("data-name","windstorm-generated"),r.innerHTML="@layer ws.custom ws.macro ws.user;",document.head.append(r);const o=(e,...r)=>{const o=String.raw(e,...r);return a(t(o),{"&":[]},"&")},a=(e,t,r)=>{for(const o of e)s(o,t,r);return t},n=e=>e.replace(/@([a-zA-Z0-9\-_]+)/g,((e,t)=>`var(--${t})`)),s=(e,t,r)=>{if("var"===e.type)return void t[r].push(`--${e.name}: ${n(e.value)};`);if("css"===e.type)return void t[r].push(`${e.name}: ${n(e.value)};`);if("macro"===e.type){const o=i[e.name];if(void 0===o)return void console.warn(`no macro for "${e.name}"`);for(const[a,s]of Object.entries(o)){const o=a.replace("&",r);t[o]=t[o]??[],t[o].push(...s.map((t=>n(t.replace(/%(arg|\d+)/g,((t,r)=>e.value?.[r]??""))))))}return}const o=e.selector.replaceAll("&",r);t[o]=[...t[o]??[]],a(e.rules,t,o)},i={},l=e=>(t,...r)=>i[e]=o(t,...r),c=e=>Object.entries(e).reduce(((e,[t,r])=>{if(!0===t.startsWith("|")){const o=t.lastIndexOf("|"),a=[`@media (${t.slice(1,o)}) {`,`${`&${t.slice(o+1)}`} {`,...r,"}","}"].join("\n");return e.push(a),e}return e.push(`${t} {\n${r.join("\n")}\n}`),e}),[]),d=(e,t="ws.custom")=>(a,...n)=>{const s=o(a,...n),i=c(s).map((t=>t.replaceAll("&",e))),l=`@layer ${t} { ${i.join("\n")} }`;r.sheet.insertRule(l)};const p={attr:"ws-x",origin:"https://wind-cdn.axel669.net",...window.wsConfig,version:"1.0.0-beta.1",fontVersion:"2",iconVersion:"3.34.0"},h={},u=async(e,t)=>{const r=h[t],o=`ws-icon-${t}`;if(void 0!==r){if(await r.loaded,"loaded"!==r.status||null===e)return;return void e.style.setProperty("--icon-font",o)}const a=new FontFace(o,`url(${p.origin}/icon/${t}.woff?v${p.iconVersion})`);h[t]=a;try{await a.load()}catch(e){console.error(e)}document.fonts.add(a),u(e,t)},g=e=>{if(void 0===e.tagName)return;const t=e.dataset.icon??null;null!==t&&u(e,t)},f={childList(e){0!==e.addedNodes.length&&e.addedNodes.forEach((e=>{if(void 0===e.tagName)return;[e,...e.querySelectorAll("*")].forEach(g)}))},attributes(e){g(e.target)}};new MutationObserver((e=>e.forEach((e=>f[e.type](e))))).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-icon"]});const b=(...e)=>{for(const t of e)u(null,t)};l("appr")`*apperance: %arg; *-webkit-appearance: %arg;`,l("area")`*grid-area: %arg;`,l("b")`*border: %arg;`,l("b.b")`*border-bottom: %arg;`,l("b.b.c")`*border-bottom-color: %arg;`,l("b.b.s")`*border-bottom-style: %arg;`,l("b.b.w")`*border-bottom-width: %arg;`,l("b.c")`*border-color: %arg;`,l("b.l")`*border-left: %arg;`,l("b.l.c")`*border-left-color: %arg;`,l("b.l.s")`*border-left-style: %arg;`,l("b.l.w")`*border-left-width: %arg;`,l("b.r")`*border-right: %arg;`,l("b.r.c")`*border-right-color: %arg;`,l("b.r.s")`*border-right-style: %arg;`,l("b.r.w")`*border-right-width: %arg;`,l("b.s")`*border-style: %arg;`,l("b.t")`*border-top: %arg;`,l("b.t.c")`*border-top-color: %arg;`,l("b.t.s")`*border-top-style: %arg;`,l("b.t.w")`*border-top-width: %arg;`,l("b.w")`*border-width: %arg;`,l("b.x")`*border-left: %arg; *border-right: %arg;`,l("b.x.c")`*border-left-color: %arg; *border-right-color: %arg;`,l("b.x.s")`*border-left-style: %arg; *border-right-style: %arg;`,l("b.x.w")`*border-left-width: %arg; *border-right-width: %arg;`,l("b.y")`*border-top: %arg; *border-bottom: %arg;`,l("b.y.c")`*border-top-color: %arg; *border-bottom-color: %arg;`,l("b.y.s")`*border-top-style: %arg; *border-bottom-style: %arg;`,l("b.y.w")`*border-top-width: %arg; *border-bottom-width: %arg;`,l("bg")`*background: %arg;`,l("bg.att")`*background-attachment: %arg;`,l("bg.c")`*background-color: %arg;`,l("bg.img")`*background-image: %arg;`,l("bg.pos")`*background-position: %arg;`,l("bg.rep")`*background-repeat: %arg;`,l("bg.sz")`*background-size: %arg;`,l("c")`*color: %arg;`,l("col")`*grid-column: %arg;`,l("cur")`*cursor: %arg;`,l("disp")`*display: %arg;`,l("fl.basis")`*flex-basis: %arg;`,l("fl.cross")`*align-items: %arg;`,l("fl.dir")`*flex-direction: %arg;`,l("fl.flow")`*flex-flow: %arg;`,l("fl.grow")`*flex-grow: %arg;`,l("fl.main")`*justify-content: %arg;`,l("fl.shrink")`*flex-shrink: %arg;`,l("fl.size")`*flex: %arg;`,l("fl.wr")`*flex-wrap: %arg;`,l("font")`*font-family: %arg;`,l("gap")`*gap: %arg;`,l("gap.col")`*column-gap: %arg;`,l("gap.row")`*row-gap: %arg;`,l("gr.areas")`*grid-template-areas: %arg;`,l("gr.cols")`*grid-template-columns: %arg;`,l("gr.cols.a")`*grid-auto-columns: %arg;`,l("gr.flow")`*grid-auto-flow: %arg;`,l("gr.rows")`*grid-template-rows: %arg;`,l("gr.rows.a")`*grid-auto-rows: %arg;`,l("h")`*height: %arg;`,l("h.max")`*max-height: %arg;`,l("h.min")`*min-height: %arg;`,l("inset")`*top: %arg; *left: %arg; *bottom: %arg; *right: %arg;`,l("inset.x")`*left: %arg; *right: %arg;`,l("inset.y")`*top: %arg; *bottom: %arg;`,l("m")`*margin: %arg;`,l("m.b")`*margin-bottom: %arg;`,l("m.l")`*margin-left: %arg;`,l("m.r")`*margin-right: %arg;`,l("m.t")`*margin-top: %arg;`,l("m.x")`*margin-left: %arg; *margin-right: %arg;`,l("m.y")`*margin-bottom: %arg; *margin-top: %arg;`,l("o")`*opacity: %arg;`,l("outln")`*outline: %arg;`,l("over")`*overflow: %arg;`,l("over.x")`*overflow-x: %arg;`,l("over.y")`*overflow-y: %arg;`,l("p")`*padding: %arg;`,l("p.b")`*padding-bottom: %arg;`,l("p.l")`*padding-left: %arg;`,l("p.r")`*padding-right: %arg;`,l("p.t")`*padding-top: %arg;`,l("p.x")`*padding-left: %arg; *padding-right: %arg;`,l("p.y")`*padding-top: %arg; *padding-bottom: %arg;`,l("pos")`*position: %arg;`,l("pos.abs")`*position: absolute;`,l("pos.fix")`*position: fixed;`,l("pos.rel")`*position: relative;`,l("pos.stick")`*position: sticky;`,l("r")`*border-radius: %arg;`,l("r.b")`*border-bottom-left-radius: %arg; *border-bottom-right-radius: %arg;`,l("r.bl")`*border-bottom-left-radius: %arg;`,l("r.br")`*border-bottom-right-radius: %arg;`,l("r.l")`*border-top-left-radius: %arg; *border-bottom-left-radius: %arg;`,l("r.r")`*border-top-right-radius: %arg; *border-bottom-right-radius: %arg;`,l("r.t")`*border-top-left-radius: %arg; *border-top-right-radius: %arg;`,l("r.tl")`*border-top-left-radius: %arg;`,l("r.tr")`*border-top-right-radius: %arg;`,l("row")`*grid-row: %arg;`,l("sel")`*user-select: %arg;`,l("self.cross")`*align-self: %arg;`,l("self.main")`*justify-self: %arg;`,l("sh.box")`*box-shadow: %arg;`,l("sh.text")`*text-shadow: %arg;`,l("t.a")`*text-align: %arg;`,l("t.br")`*word-break: %arg;`,l("t.c")`*color: %arg;`,l("t.deco")`*text-decoration: %arg;`,l("t.lh")`*line-height: %arg;`,l("t.over")`*text-overflow: %arg;`,l("t.st")`*font-style: %arg;`,l("t.sz")`*font-size: %arg;`,l("t.tf")`*text-transform: %arg;`,l("t.var")`*font-variant: %arg;`,l("t.wrap")`*word-wrap: %arg;`,l("t.ws")`*white-space: %arg;`,l("t.wt")`*font-weight: %arg;`,l("tf")`*transform: %arg;`,l("tf.o")`*transform-origin: %arg;`,l("tf.p")`*perspective: %arg;`,l("tr")`*transition: %arg;`,l("v.a")`*vertical-align: %arg;`,l("vis")`*visibility: %arg;`,l("w")`*width: %arg;`,l("w.max")`*max-width: %arg;`,l("w.min")`*min-width: %arg;`,l("x")`*left: %arg;`,l("-x")`*right: %arg;`,l("y")`*top: %arg;`,l("-y")`*bottom: %arg;`,l("z")`*z-index: %arg;`,l("fl.cn")`fl.cross: center; fl.main: center;`,l("fl.cn.cross")`fl.cross: center;`,l("fl.cn.main")`fl.main: center;`,l("flex")`disp: flex; fl.dir: %arg;`,l("grid")`disp: grid; gr.flow: %arg;`,l("hide")`disp: none;`,l("invis")`vis: hidden;`,l("sticky")`pos: sticky; y: 0px; z: +1;`,l("adorn")`disp: flex; fl.cn; p: 4px;`,l("pad.compact")`p: 0px 4px;`,l("variant.outline")`b.w: 1px;`,l("variant.fill")`@text-color: @alt-color; @fill-color: @core-color; @active: @alt-color;`,l("variant.lined")`b.w: 0px; b.b.w: @border-size; r.b: 0px;`,l("gr.cols-fit")`*grid-template-columns: repeat(auto-fit, minmax(%arg));`,l("gr.cols-fill")`*grid-template-columns: repeat(auto-fill, minmax(%arg));`,l("text.subtitle")`t.sz: @text-size-subtitle; flex; fl.main: center; p: 0px 8px;`,l("text.title")`t.sz: @text-size-title; flex; fl.main: center; p: 4px 8px;`,l("elevate")`sh.box: 0px 2px 3px @shadow-color;`,l("#animate")`
2
2
  @modal-transition: visibility @anim-time linear;
3
3
  ! & ws-dialog {
4
4
  o: 0;
@@ -123,49 +123,35 @@ const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===
123
123
  --color: var(--primary);
124
124
  --core-color: hsl(var(--color), var(--layer-element));
125
125
  --alt-color: hsl(var(--color), var(--layer-border));
126
- --size: 100px;
127
- display: inline;
126
+ --size: 200px;
128
127
  }
129
- @keyframes spin {
130
- from {
128
+ svg {
129
+ width: var(--size);
130
+ height: var(--size);
131
+ }
132
+ @keyframes turn {
133
+ 0% {
131
134
  transform: rotate(0deg);
132
135
  }
133
- to {
136
+ 100% {
134
137
  transform: rotate(360deg);
135
138
  }
136
139
  }
137
140
  circle {
138
- animation-name: spin;
141
+ animation-name: turn;
142
+ animation-duration: calc(1000ms * var(--n));
139
143
  animation-iteration-count: infinite;
140
- animation-timing-function: linear;
141
- transform-origin: 50% 50%;
142
- stroke: var(--core-color);
143
- }
144
- circle.mid {
145
- stroke: var(--alt-color);
146
- }
147
- circle:nth-child(1) {
148
- animation-duration: 4s;
149
- }
150
- circle:nth-child(2) {
151
- animation-duration: 3s;
152
- animation-direction: reverse;
153
- }
154
- circle:nth-child(3) {
155
- animation-duration: 2s;
156
- }
157
-
158
- svg {
159
- display: inline-block;
160
- width: var(--size);
161
- height: var(--size);
144
+ animation-timing-function: ease;
145
+ stroke: var(--c);
146
+ stroke-width: 6;
147
+ fill: none;
148
+ animation-direction: var(--anim);
162
149
  }
163
150
  </style>
164
-
165
- <svg viewBox="0 0 100 100">
166
- <circle cx="50" cy="50" stroke-width="4" fill="transparent" r="48" stroke-dasharray="0 37.7 75.4 75.4 75.4 75.4"></circle>
167
- <circle class="mid" cx="50" cy="50" stroke-width="4" fill="transparent" r="40" stroke-dasharray="0 31.4 62.83 62.83 62.83 62.83"></circle>
168
- <circle cx="50" cy="50" stroke-width="4" fill="transparent" r="32" stroke-dasharray="0 12.57 25.13 25.13 25.13 25.13 25.13 25.13 25.13 25.13"></circle>
151
+ <svg viewbox="-50 -50 100 100">
152
+ <circle style="--c: var(--core-color);--o: 1; --anim: forward; --n: 2.5;" cx=0 cy=0 r=45 stroke-dasharray="45 45"></circle>
153
+ <circle style="--c: var(--alt-color);--o: 0.5; --anim: reverse; --n: 2;" cx=0 cy=0 r=35 stroke-dasharray="35 35"></circle>
154
+ <circle style="--c: var(--core-color);--o: 0.75; --anim: forward; --n: 3.5;" cx=0 cy=0 r=25 stroke-dasharray="25 25"></circle>
169
155
  </svg>
170
156
  `;customElements.define("ws-circle-spinner",class extends HTMLElement{constructor(){super();this.attachShadow({mode:"closed"}).appendChild($())}});const A=z`
171
157
  <style>
@@ -173,55 +159,68 @@ const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===
173
159
  --color: var(--primary);
174
160
  --core-color: hsl(var(--color), var(--layer-element));
175
161
  --alt-color: hsl(var(--color), var(--layer-border));
176
- --size: 100px;
177
- display: inline;
162
+ --size: 200px;
178
163
  }
179
- @keyframes spin {
180
- from {
181
- transform: rotateY(0deg);
182
- }
183
- to {
184
- transform: rotateY(360deg);
185
- }
164
+ svg {
165
+ width: var(--size);
166
+ height: var(--size);
186
167
  }
187
- path {
188
- animation-name: spin;
168
+ circle {
169
+ stroke-width: 0;
170
+ fill: var(--c);
171
+ offset-path: path("M 0 -45 L 39 -22.5 L 39 22.5 L 0 45 L -39 22.5 L -39 -22.5 L 0 -45");
172
+ animation-name: mover;
173
+ animation-duration: 3000ms;
189
174
  animation-iteration-count: infinite;
190
175
  animation-timing-function: linear;
191
- transform-origin: 50% 50%;
192
- stroke: var(--core-color);
193
- }
194
- path.mid {
195
- stroke: var(--alt-color);
196
176
  }
197
- path:nth-child(1) {
198
- animation-duration: 3s;
199
- }
200
- path:nth-child(2) {
201
- animation-duration: 2s;
202
- animation-direction: reverse;
177
+ @keyframes mover {
178
+ 0% {
179
+ offset-distance: 0%;
180
+ }
181
+ 100% {
182
+ offset-distance: 100%;
183
+ }
203
184
  }
204
- path:nth-child(3) {
205
- animation-duration: 1s;
185
+ @keyframes trail {
186
+ 0% {
187
+ stroke-dashoffset: 0;
188
+ }
189
+ 100% {
190
+ stroke-dashoffset: var(--len);
191
+ }
206
192
  }
207
-
208
- svg {
209
- display: inline-block;
210
- width: var(--size);
211
- height: var(--size);
193
+ path {
194
+ animation-name: trail;
195
+ animation-duration: 3000ms;
196
+ animation-iteration-count: infinite;
197
+ animation-timing-function: linear;
198
+ stroke: var(--c);
199
+ stroke-width: 6;
200
+ fill: none;
201
+ animation-direction: var(--anim);
212
202
  }
213
203
  </style>
214
-
215
- <svg viewBox="0 0 100 100">
216
- <path stroke-width="4" fill="none" d="M91.57 26v48L50 98 8.43 74V26L50 2l41.57 24Z"></path>
217
- <path stroke-width="4" class="mid" fill="none" d="M81.177 32v36L50 86 18.823 68V32L50 14l31.177 18Z"></path>
218
- <path stroke-width="4" fill="none" d="M70.785 38v24L50 74 29.215 62V38L50 26l20.785 12Z"></path>
204
+ <svg viewbox="-50 -50 100 100">
205
+ <path
206
+ d="M 0 -36 L 31 -18 L 31 18 L 0 36 L -31 18 L -31 -18 L 0 -36 Z"
207
+ style="--c: var(--alt-color); --len: 216;"
208
+ stroke-dasharray="36 36"
209
+ />
210
+ <path
211
+ d="M 0 -22.5 L 19.5 -11.25 L 19.5 11.25 L 0 22.5 L -19.5 11.25 L -19.5 -11.25 L 0 -22.5 Z"
212
+ style="--c: var(--core-color); --anim: reverse; --len: 135;"
213
+ stroke-dasharray="22.5 22.5"
214
+ />
215
+ <circle r="3" style="--c: var(--core-color); animation-delay: -250ms;"/>
216
+ <circle r="3" style="--c: var(--core-color); animation-delay: -1250ms;" />
217
+ <circle r="3" style="--c: var(--core-color); animation-delay: -2250ms;" />
219
218
  </svg>
220
- `;customElements.define("ws-hexagon-spinner",class extends HTMLElement{constructor(){super();this.attachShadow({mode:"closed"}).appendChild(A())}});var E=(e,t)=>`\n @core: ${e};\n @alt: ${t};\n @core-color: hsl(@color, @core);\n @alt-color: hsl(@color, @alt);\n\n @fill: var(--fill-color, transparent);\n @text: var(--text-color, @core-color);\n @active: @text;\n`;d("ws-avatar")`
219
+ `;customElements.define("ws-hexagon-spinner",class extends HTMLElement{constructor(){super();this.attachShadow({mode:"closed"}).appendChild(A())}});var L=(e,t)=>`\n @core: ${e};\n @alt: ${t};\n @core-color: hsl(@color, @core);\n @alt-color: hsl(@color, @alt);\n\n @fill: var(--fill-color, transparent);\n @text: var(--text-color, @core-color);\n @active: @text;\n`;d("ws-avatar")`
221
220
  @color: @mono;
222
221
  @size: 36px;
223
222
 
224
- ${E("@layer-element","@layer-fill")}
223
+ ${L("@layer-element","@layer-fill")}
225
224
 
226
225
  disp: inline-flex;
227
226
  over: hidden;
@@ -247,7 +246,7 @@ const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===
247
246
  `,d("ws-badge")`
248
247
  @color: @primary;
249
248
 
250
- ${E("@layer-element","@layer-fill")}
249
+ ${L("@layer-element","@layer-fill")}
251
250
 
252
251
  pos: relative;
253
252
  disp: inline-grid;
@@ -273,10 +272,10 @@ const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===
273
272
  z: @z-info;
274
273
  t.wt: 600;
275
274
  }
276
- `;var L='\n over: hidden;\n pos: relative;\n cur: pointer;\n\n ! &::after {\n *content: "";\n pos: absolute;\n y: 0px;\n x: 0px;\n -y: 0px;\n -x: 0px;\n *pointer-events: none;\n o: 0;\n bg.c: @active;\n tr: opacity @anim-time linear;\n }\n ! &:where(:not(:disabled)):active::after {\n tr: none;\n o: 0.3;\n }\n',S='\n over: hidden;\n pos: relative;\n\n ! |pointer: fine| {\n ! &::before {\n *content: "";\n pos: absolute;\n y: 0px;\n x: 0px;\n -y: 0px;\n -x: 0px;\n *pointer-events: none;\n o: 0;\n bg.c: @active;\n }\n ! &:where(:not(:disabled)):hover::before {\n tr: none;\n o: 0.1;\n }\n }\n';d(":where(button[data-ws], a[data-ws][button], label[data-ws][button])")`
275
+ `;var E='\n over: hidden;\n pos: relative;\n cur: pointer;\n\n ! &::after {\n *content: "";\n pos: absolute;\n y: 0px;\n x: 0px;\n -y: 0px;\n -x: 0px;\n *pointer-events: none;\n o: 0;\n bg.c: @active;\n tr: opacity @anim-time linear;\n }\n ! &:where(:not(:disabled)):active::after {\n tr: none;\n o: 0.3;\n }\n',S='\n over: hidden;\n pos: relative;\n\n ! |pointer: fine| {\n ! &::before {\n *content: "";\n pos: absolute;\n y: 0px;\n x: 0px;\n -y: 0px;\n -x: 0px;\n *pointer-events: none;\n o: 0;\n bg.c: @active;\n }\n ! &:where(:not(:disabled)):hover::before {\n tr: none;\n o: 0.1;\n }\n }\n';d(":where(button[data-ws], a[data-ws][button], label[data-ws][button])")`
277
276
  @color: @primary;
278
277
 
279
- ${E("@layer-element","@layer-fill")}
278
+ ${L("@layer-element","@layer-fill")}
280
279
 
281
280
  pos: relative;
282
281
 
@@ -302,11 +301,11 @@ const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===
302
301
  }
303
302
 
304
303
  ${S}
305
- ${L}
304
+ ${E}
306
305
  `,d("ws-chip")`
307
306
  @color: @mono;
308
307
 
309
- ${E("@layer-element","@layer-fill")}
308
+ ${L("@layer-element","@layer-fill")}
310
309
 
311
310
  disp: inline-flex;
312
311
  fl.cross: center;
@@ -321,7 +320,7 @@ const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===
321
320
 
322
321
  ! &[clickable] {
323
322
  cur: pointer;
324
- ${L}
323
+ ${E}
325
324
  }
326
325
  `,d("label[control][data-ws]")`
327
326
  @color: @primary;
@@ -393,11 +392,11 @@ const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===
393
392
  t.ws: nowrap;
394
393
  t.sz: @text-size-normal;
395
394
  }
396
- `,f("caret-right-filled"),d(":where(details[data-ws])")`
395
+ `,b("caret-right-filled"),d(":where(details[data-ws])")`
397
396
  @color: @primary;
398
397
  @padding: 8px;
399
398
 
400
- ${E("@layer-element","@layer-fill")}
399
+ ${L("@layer-element","@layer-fill")}
401
400
 
402
401
  b: 0px solid @core-color;
403
402
  p: 0px @padding;
@@ -532,7 +531,7 @@ const e=Symbol("no match"),t=(t,r)=>{const o=r=>{const o=r.length;return()=>r===
532
531
  `;customElements.define("ws-modal",class extends HTMLElement{#e=null;constructor(){super(),this.#e=this.attachShadow({mode:"closed",delegatesFocus:!0}),this.#e.append(q())}connectedCallback(){window.addEventListener("keydown",(e=>{!0!==(!1===this.open||"Escape"!==e.key||!0===this.persistent)&&(this.hide(),this.dispatchEvent(new Event("close")))}));this.#e.querySelector("ws-modal-overlay").addEventListener("click",(e=>{!0!==this.persistent&&(this.hide(),this.dispatchEvent(new Event("close")))}))}get open(){return this.hasAttribute("open")}set open(e){!1!==e?this.setAttribute("open",""):this.removeAttribute("open")}get persistent(){return this.hasAttribute("persistent")}set persistent(e){!1!==e?this.setAttribute("persistent",""):this.removeAttribute("persistent")}show(){this.open=!0}hide(){this.open=!1}}),d("ws-paper")`
533
532
  @color: @mono;
534
533
 
535
- ${E("@layer-surface","@layer-border")}
534
+ ${L("@layer-surface","@layer-border")}
536
535
 
537
536
  disp: grid;
538
537
  r: @base-radius;
@@ -641,8 +640,8 @@ div::after {
641
640
  ! & > :where(*) {
642
641
  area: content;
643
642
  }
644
- `;const V="caret-down-filled";f(V),d("ws-option")`
645
- ${E("@layer-element","@layer-fill")}
643
+ `;const T="caret-down-filled";b(T),d("ws-option")`
644
+ ${L("@layer-element","@layer-fill")}
646
645
 
647
646
  disp: block;
648
647
  p: 8px;
@@ -660,7 +659,7 @@ div::after {
660
659
  }
661
660
 
662
661
  ${S}
663
- ${L}
662
+ ${E}
664
663
  `,d("ws-optgroup")`
665
664
  grid;
666
665
  gr.cols: 16px 1fr;
@@ -677,7 +676,7 @@ div::after {
677
676
  ! & > * {
678
677
  col: 2;
679
678
  }
680
- `;const T=z`
679
+ `;const I=z`
681
680
  <style>
682
681
  :host {
683
682
  --color: var(--mono);
@@ -758,7 +757,7 @@ div::after {
758
757
  }
759
758
  ws-sel-caret::before {
760
759
  display: block;
761
- font-family: ws-icon-${V};
760
+ font-family: ws-icon-${T};
762
761
  content: attr(data-icon);
763
762
  }
764
763
  slot[name="selected"] {
@@ -787,7 +786,7 @@ div::after {
787
786
  <ws-selected>No Selection</ws-selected>
788
787
  </slot>
789
788
  <slot name="display"></slot>
790
- <ws-sel-caret data-icon="${V}"></ws-sel-caret>
789
+ <ws-sel-caret data-icon="${T}"></ws-sel-caret>
791
790
  </value-display>
792
791
  <ws-popover>
793
792
  <slot slot="popover" name="options">
@@ -796,7 +795,7 @@ div::after {
796
795
  </ws-options>
797
796
  </slot>
798
797
  </ws-popover>
799
- `,I="ws-option";customElements.define("ws-select",class extends HTMLElement{static formAssociated=!0;#a=null;#n=-1;#s=null;#i=null;#l=null;#c=null;#e=null;#d=null;#p(){return[...this.querySelectorAll(I)]}#h(e){const t=Array.from(e,(e=>[...e.addedNodes])).flat();if(!1===t.some((e=>e.tagName?.toLowerCase()===I)))return;const r=t.findLast((e=>e.tagName?.toLowerCase()===I&&!0===e.hasAttribute("selected")))??this.#s,o=this.#p();for(const e of o)e.removeAttribute("selected");this.selectedIndex=o.indexOf(r),this.updatePreview()}constructor(){super(),this.#e=this.attachShadow({mode:"closed",delegatesFocus:!0}),this.#e.append(T()),this.#c=this.#e.querySelector("slot[name=selected]"),this.#l=this.#e.querySelector("ws-popover"),this.#d=this.#e.querySelector("value-display"),this.#l.sizeTarget=this,this.removeAttribute("open"),this.display=document.createElement("ws-display"),this.display.slot="display"}connectedCallback(){this.insertBefore(this.display,this.firstChild),this.updatePreview(),this.tabIndex=this.getAttribute("tabindex")??"0";const e=new MutationObserver(this.#h.bind(this));e.observe(this,{childList:!0,subtree:!0}),this.#i=e,this.role="combobox",this.addEventListener("click",(()=>{this.open(),this.#d.focus()}),{passive:!0}),this.#l.addEventListener("close",(()=>this.close())),this.#l.addEventListener("pointerdown",(e=>e.preventDefault())),this.#l.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()})),this.#e.querySelector("slot[name='options']").addEventListener("pointerdown",(e=>e.preventDefault())),this.#e.querySelector("slot[name='options']").addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault();const t=e.target.tagName?.toLowerCase();"ws-option"===t&&(this.selectedIndex=this.#p().indexOf(e.target),this.close(),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new Event("input",{bubbles:!0})))}))}disconnectedCallback(){this.#i.disconnect()}get value(){return this.#a}set value(e){if(this.#a=e,null===e)return void(this.selectedIndex=-1);const t=this.#p(),r=t.find((t=>t.value===e||t.getAttribute("value")===e));this.selectedIndex=t.indexOf(r)}get selectedIndex(){return this.#n}set selectedIndex(e){this.#s?.removeAttribute("selected");const t=this.#p(),r=Math.min(e,t.length);this.#s=t[r]??null,this.#n=r,this.#s?.setAttribute("selected",""),this.#a=this.#s?.value??this.#s?.getAttribute("value")??this.#a,this.updatePreview()}updatePreview(){const e=this.querySelector("[slot=selected]")??this.#c;this.display.innerHTML=e.innerHTML,this.display.querySelector("ws-selected").innerHTML=this.#s?.getAttribute("preview")??this.#s?.innerHTML??this.getAttribute("blank")??"No Selection"}toggle(){null!==this.getAttribute("open")?this.close():this.open()}open(){this.setAttribute("open","");const e=this.querySelector("ws-options")??this.#e.querySelector("ws-options"),t=e.getBoundingClientRect();e.style.setProperty("--opt-h",`${t.height}px`),e.style.setProperty("--opt-w",`${t.width}px`),this.#l.show(),e.scrollTop=0,this.#s?.scrollIntoView()}close(){this.removeAttribute("open"),this.#l.hide()}__childValueMatch(e){const t=this.#p().indexOf(e);this.selectedIndex=t}}),d("table[data-ws]")`
798
+ `,V="ws-option";customElements.define("ws-select",class extends HTMLElement{static formAssociated=!0;#a=null;#n=-1;#s=null;#i=null;#l=null;#c=null;#e=null;#d=null;#p(){return[...this.querySelectorAll(V)]}#h(e){const t=Array.from(e,(e=>[...e.addedNodes])).flat();if(!1===t.some((e=>e.tagName?.toLowerCase()===V)))return;const r=t.findLast((e=>e.tagName?.toLowerCase()===V&&!0===e.hasAttribute("selected")))??this.#s,o=this.#p();for(const e of o)e.removeAttribute("selected");this.selectedIndex=o.indexOf(r),this.updatePreview()}constructor(){super(),this.#e=this.attachShadow({mode:"closed",delegatesFocus:!0}),this.#e.append(I()),this.#c=this.#e.querySelector("slot[name=selected]"),this.#l=this.#e.querySelector("ws-popover"),this.#d=this.#e.querySelector("value-display"),this.#l.sizeTarget=this,this.removeAttribute("open"),this.display=document.createElement("ws-display"),this.display.slot="display"}connectedCallback(){this.insertBefore(this.display,this.firstChild),this.updatePreview(),this.tabIndex=this.getAttribute("tabindex")??"0";const e=new MutationObserver(this.#h.bind(this));e.observe(this,{childList:!0,subtree:!0}),this.#i=e,this.role="combobox",this.addEventListener("click",(()=>{this.open(),this.#d.focus()}),{passive:!0}),this.#l.addEventListener("close",(()=>this.close())),this.#l.addEventListener("pointerdown",(e=>e.preventDefault())),this.#l.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()})),this.#e.querySelector("slot[name='options']").addEventListener("pointerdown",(e=>e.preventDefault())),this.#e.querySelector("slot[name='options']").addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault();const t=e.target.tagName?.toLowerCase();"ws-option"===t&&(this.selectedIndex=this.#p().indexOf(e.target),this.close(),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new Event("input",{bubbles:!0})))}))}disconnectedCallback(){this.#i.disconnect()}get value(){return this.#a}set value(e){if(this.#a=e,null===e)return void(this.selectedIndex=-1);const t=this.#p(),r=t.find((t=>t.value===e||t.getAttribute("value")===e));this.selectedIndex=t.indexOf(r)}get selectedIndex(){return this.#n}set selectedIndex(e){this.#s?.removeAttribute("selected");const t=this.#p(),r=Math.min(e,t.length);this.#s=t[r]??null,this.#n=r,this.#s?.setAttribute("selected",""),this.#a=this.#s?.value??this.#s?.getAttribute("value")??this.#a,this.updatePreview()}updatePreview(){const e=this.querySelector("[slot=selected]")??this.#c;this.display.innerHTML=e.innerHTML,this.display.querySelector("ws-selected").innerHTML=this.#s?.getAttribute("preview")??this.#s?.innerHTML??this.getAttribute("blank")??"No Selection"}toggle(){null!==this.getAttribute("open")?this.close():this.open()}open(){this.setAttribute("open","");const e=this.querySelector("ws-options")??this.#e.querySelector("ws-options"),t=e.getBoundingClientRect();e.style.setProperty("--opt-h",`${t.height}px`),e.style.setProperty("--opt-w",`${t.width}px`),this.#l.show(),e.scrollTop=0,this.#s?.scrollIntoView()}close(){this.removeAttribute("open"),this.#l.hide()}__childValueMatch(e){const t=this.#p().indexOf(e);this.selectedIndex=t}}),d("table[data-ws]")`
800
799
  @color: @primary;
801
800
 
802
801
  *border-collapse: separate;
@@ -858,7 +857,7 @@ div::after {
858
857
  `,d("ws-tabs")`
859
858
  @color: @primary;
860
859
 
861
- ${E("@layer-element","@layer-fill")}
860
+ ${L("@layer-element","@layer-fill")}
862
861
 
863
862
  disp: grid;
864
863
  gr.cols.a: 1fr;
@@ -910,12 +909,12 @@ div::after {
910
909
  }
911
910
  }
912
911
 
913
- ${L}
912
+ ${E}
914
913
  `,d("ws-titlebar")`
915
914
  @border-size: 2px;
916
915
  @color: @primary;
917
916
 
918
- ${E("@layer-element","@layer-fill")}
917
+ ${L("@layer-element","@layer-fill")}
919
918
 
920
919
  disp: grid;
921
920
  h.min: 52px;
@@ -1008,7 +1007,7 @@ div::after {
1008
1007
  ! &[pos$="-right"] {
1009
1008
  -x: 20px;
1010
1009
  }
1011
- `,f("square-dashed","square-check-filled","circle","circle-check-filled","circle-filled");const j='\n @color: var(--toggle-color, @primary);\n @size: 20px;\n\n @core-color: hsl(@color, @layer-element);\n\n pos: relative;\n w: @size;\n h: @size;\n appr: none;\n m: 0px;\n t.c: @core-color;\n v.a: middle;\n\n ! &::after {\n *content: "";\n pos: absolute;\n t.sz: calc(@size - 2px);\n *speak: none;\n t.st: normal;\n t.wt: 400;\n t.var: normal;\n t.tf: none;\n y: 50%;\n x: 50%;\n w: @size;\n h: @size;\n tf: translate(-50%, -50%);\n disp: flex;\n fl.cross: center;\n fl.main: center;\n over: hidden;\n }\n';d(":where(input[data-ws][type=checkbox]:not([switch]))")`
1010
+ `,b("square-dashed","square-check-filled","circle","circle-check-filled","circle-filled");const j='\n @color: var(--toggle-color, @primary);\n @size: 20px;\n\n @core-color: hsl(@color, @layer-element);\n\n pos: relative;\n w: @size;\n h: @size;\n appr: none;\n m: 0px;\n t.c: @core-color;\n v.a: middle;\n\n ! &::after {\n *content: "";\n pos: absolute;\n t.sz: calc(@size - 2px);\n *speak: none;\n t.st: normal;\n t.wt: 400;\n t.var: normal;\n t.tf: none;\n y: 50%;\n x: 50%;\n w: @size;\n h: @size;\n tf: translate(-50%, -50%);\n disp: flex;\n fl.cross: center;\n fl.main: center;\n over: hidden;\n }\n';d(":where(input[data-ws][type=checkbox]:not([switch]))")`
1012
1011
  ${j}
1013
1012
 
1014
1013
  ! &::after {
@@ -1164,4 +1163,4 @@ div::after {
1164
1163
  url(${p.origin}/font/roboto.woff2?v${p.version})
1165
1164
  format("woff2")
1166
1165
  ;
1167
- `;const P=e=>{const t=(e=>{if(""===e||null===e||"true"===e)return;const t=c(o({raw:[e]})),a=m(t.join("\n"));if(x[a]=(x[a]??0)+1,x[a]>1)return a;const n=t.map((e=>e.replaceAll("&",`[data-wsid="${a}"]`)));return r.sheet.insertRule(`@layer ws.macro { ${n.join("\n")} }`,r.sheet.cssRules.length),a})(e.dataset?.ws?.trim()??"");void 0!==t?e.dataset.wsid=t:delete e.dataset?.wsid};new MutationObserver((e=>{const t=new Set(Array.from(e,(e=>[e.target,...Array.from(e.addedNodes,(e=>[e,...e.querySelectorAll?.("*")||[]]))])).flat(3));for(const e of t)P(e)})).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-ws"]});for(const e of document.querySelectorAll("*"))P(e);export{d as component,w as localMacro,l as macro,f as preloadIcons,y as version,v as x};
1166
+ `;const P=e=>{const t=(e=>{if(""===e||null===e||"true"===e)return;const t=c(o({raw:[e]})),a=m(t.join("\n"));if(x[a]=(x[a]??0)+1,x[a]>1)return a;const n=t.map((e=>e.replaceAll("&",`[data-wsid="${a}"]`)));return r.sheet.insertRule(`@layer ws.macro { ${n.join("\n")} }`,r.sheet.cssRules.length),a})(e.dataset?.ws?.trim()??"");void 0!==t?e.dataset.wsid=t:delete e.dataset?.wsid};new MutationObserver((e=>{const t=new Set(Array.from(e,(e=>[e.target,...Array.from(e.addedNodes,(e=>[e,...e.querySelectorAll?.("*")||[]]))])).flat(3));for(const e of t)P(e)})).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-ws"]});for(const e of document.querySelectorAll("*"))P(e);export{d as component,w as localMacro,l as macro,b as preloadIcons,y as version,v as x};
package/dist/ws-nc-es5.js CHANGED
@@ -1,4 +1,4 @@
1
- var ws=function(r){"use strict";const t=Symbol("no match"),e=(r,e)=>{const o=e=>{const o=e.length;return()=>e===r.substr(R,o)?(R+=o,e):t},a=e=>()=>{const o=r.charAt(R);return!1!==e.test(o)?(R+=1,o):t};let n=null;const l=o("@"),i=o(":"),s=a(/[^;]/),g=o(";"),u=o("*"),d=a(/[a-z0-9_\-]/i),c=o("!"),f=a(/[^{]/),b=o("{"),p=o("}"),m=a(/[a-zA-Z0-9\.\-_#\^\$\/]/),w=o("#"),h=a(/[^;#]/),x=a(/[\s]/m),y=()=>{const r=R;let e=null,o=null;return(e=q())===t||(o=z())===t?(R=r,t):[e,o]},v=()=>{const e=R;let o=null,a=null;return(o=w())===t||(a=(()=>{const e=R,o=R;for(;h()!==t;);return R-o==0?t:r.slice(e,R)})())===t?(R=e,t):[o,a]},$=()=>{n="rules";let r=R,e=null;const o=[];let a=null;for(;(a=y())!==t;)o.push(a);if(e=o,q()===t)return R=r,t;return e.map((r=>r[1]))},z=()=>{let r=null;return(r=k())!==t||(r=j())!==t||(r=A())!==t||(r=S())!==t?r:t},k=()=>{n="rule$0";let r=R,e=null;if((e=E())===t)return R=r,t;return e},j=()=>{n="rule$1";let r=R,e=null;if((e=N())===t)return R=r,t;return e},A=()=>{n="rule$2";let r=R,e=null;if((e=M())===t)return R=r,t;return e},S=()=>{n="rule$3";let r=R,e=null;if((e=V())===t)return R=r,t;return e},E=()=>{n="variable";let e=R,o=null,a=null;if(l()===t)return R=e,t;if((o=O())===t)return R=e,t;if(i()===t)return R=e,t;if(q()===t)return R=e,t;if((a=(()=>{const e=R,o=R;for(;s()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;if(g()===t)return R=e,t;return((r,t)=>({type:"var",name:r,value:t}))(o,a)},N=()=>{n="css";let e=R,o=null,a=null;if(u()===t)return R=e,t;if((o=O())===t)return R=e,t;if(i()===t)return R=e,t;if(q()===t)return R=e,t;if((a=(()=>{const e=R,o=R;for(;s()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;if(g()===t)return R=e,t;return((r,t)=>({type:"css",name:r,value:t}))(o,a)},O=()=>{n="cssName";let e=R,o=null;if((o=(()=>{const e=R,o=R;for(;d()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;return o},M=()=>{n="subrule";let e=R,o=null,a=null;if(c()===t)return R=e,t;if(q()===t)return R=e,t;if((o=(()=>{const e=R,o=R;for(;f()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;if(b()===t)return R=e,t;if((a=$())===t)return R=e,t;if(p()===t)return R=e,t;var l;return l=a,{type:"alt",selector:o.trim(),rules:l}},V=()=>{n="macro";let e=R,o=null,a=null;if((o=(()=>{const e=R,o=R;for(;m()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;const l=(()=>{const r=R;let e=null,o=null,a=null;return(e=i())===t||(o=q())===t||(a=F())===t?(R=r,t):[e,o,a]})();if(a=l===t?null:l,g()===t)return R=e,t;return((r,t)=>({type:"macro",name:r,value:t?.[2]}))(o,a)},F=()=>{let r=null;return(r=L())!==t||(r=_())!==t?r:t},L=()=>{n="macroValue$0";let r=null;const e=[];let o=null;for(;(o=v())!==t;)e.push(o);if(0===e.length)return t;r=e;return(r=>{const t=r.map((r=>r[1].trim()));return t.arg=t.join(" "),t})(r)},_=()=>{n="macroValue$1";let e=R,o=null;if((o=(()=>{const e=R,o=R;for(;s()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;return(r=>{const t=[r.trim()];return t.arg=r,t})(o)},q=()=>{for(n="_";x()!==t;);};let R=0;const C=(()=>{n="$";let r=R,e=null;if((e=$())===t)return R=r,t;return e})();return R!==r.length?(console.log("last",n),console.log("@",R),console.log(r.slice(R-10,R+10)),new Error("End of input not found")):C},o=document.createElement("style");o.setAttribute("data-name","windstorm-generated"),o.innerHTML="@layer ws.custom ws.macro ws.user;",document.head.append(o);const a=(r,...t)=>{const o=String.raw(r,...t);return n(e(o),{"&":[]},"&")},n=(r,t,e)=>{for(const o of r)i(o,t,e);return t},l=r=>r.replace(/@([a-zA-Z0-9\-_]+)/g,((r,t)=>`var(--${t})`)),i=(r,t,e)=>{if("var"===r.type)return void t[e].push(`--${r.name}: ${l(r.value)};`);if("css"===r.type)return void t[e].push(`${r.name}: ${l(r.value)};`);if("macro"===r.type){const o=s[r.name];if(void 0===o)return void console.warn(`no macro for "${r.name}"`);for(const[a,n]of Object.entries(o)){const o=a.replace("&",e);t[o]=t[o]??[],t[o].push(...n.map((t=>l(t.replace(/%(arg|\d+)/g,((t,e)=>r.value?.[e]??""))))))}return}const o=r.selector.replaceAll("&",e);t[o]=[...t[o]??[]],n(r.rules,t,o)},s={},g=r=>(t,...e)=>s[r]=a(t,...e),u=r=>Object.entries(r).reduce(((r,[t,e])=>{if(!0===t.startsWith("|")){const o=t.lastIndexOf("|"),a=[`@media (${t.slice(1,o)}) {`,`${`&${t.slice(o+1)}`} {`,...e,"}","}"].join("\n");return r.push(a),r}return r.push(`${t} {\n${e.join("\n")}\n}`),r}),[]);const d={attr:"ws-x",origin:"https://wind-cdn.axel669.net",...window.wsConfig,version:"1.0.0-beta.0",fontVersion:"2",iconVersion:"3.34.0"},c={},f=async(r,t)=>{const e=c[t],o=`ws-icon-${t}`;if(void 0!==e){if(await e.loaded,"loaded"!==e.status||null===r)return;return void r.style.setProperty("--icon-font",o)}const a=new FontFace(o,`url(${d.origin}/icon/${t}.woff?v${d.iconVersion})`);c[t]=a;try{await a.load()}catch(r){console.error(r)}document.fonts.add(a),f(r,t)},b=r=>{if(void 0===r.tagName)return;const t=r.dataset.icon??null;null!==t&&f(r,t)},p={childList(r){0!==r.addedNodes.length&&r.addedNodes.forEach((r=>{if(void 0===r.tagName)return;[r,...r.querySelectorAll("*")].forEach(b)}))},attributes(r){b(r.target)}};new MutationObserver((r=>r.forEach((r=>p[r.type](r))))).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-icon"]});g("appr")`*apperance: %arg; *-webkit-appearance: %arg;`,g("area")`*grid-area: %arg;`,g("b")`*border: %arg;`,g("b.b")`*border-bottom: %arg;`,g("b.b.c")`*border-bottom-color: %arg;`,g("b.b.s")`*border-bottom-style: %arg;`,g("b.b.w")`*border-bottom-width: %arg;`,g("b.c")`*border-color: %arg;`,g("b.l")`*border-left: %arg;`,g("b.l.c")`*border-left-color: %arg;`,g("b.l.s")`*border-left-style: %arg;`,g("b.l.w")`*border-left-width: %arg;`,g("b.r")`*border-right: %arg;`,g("b.r.c")`*border-right-color: %arg;`,g("b.r.s")`*border-right-style: %arg;`,g("b.r.w")`*border-right-width: %arg;`,g("b.s")`*border-style: %arg;`,g("b.t")`*border-top: %arg;`,g("b.t.c")`*border-top-color: %arg;`,g("b.t.s")`*border-top-style: %arg;`,g("b.t.w")`*border-top-width: %arg;`,g("b.w")`*border-width: %arg;`,g("b.x")`*border-left: %arg; *border-right: %arg;`,g("b.x.c")`*border-left-color: %arg; *border-right-color: %arg;`,g("b.x.s")`*border-left-style: %arg; *border-right-style: %arg;`,g("b.x.w")`*border-left-width: %arg; *border-right-width: %arg;`,g("b.y")`*border-top: %arg; *border-bottom: %arg;`,g("b.y.c")`*border-top-color: %arg; *border-bottom-color: %arg;`,g("b.y.s")`*border-top-style: %arg; *border-bottom-style: %arg;`,g("b.y.w")`*border-top-width: %arg; *border-bottom-width: %arg;`,g("bg")`*background: %arg;`,g("bg.att")`*background-attachment: %arg;`,g("bg.c")`*background-color: %arg;`,g("bg.img")`*background-image: %arg;`,g("bg.pos")`*background-position: %arg;`,g("bg.rep")`*background-repeat: %arg;`,g("bg.sz")`*background-size: %arg;`,g("c")`*color: %arg;`,g("col")`*grid-column: %arg;`,g("cur")`*cursor: %arg;`,g("disp")`*display: %arg;`,g("fl.basis")`*flex-basis: %arg;`,g("fl.cross")`*align-items: %arg;`,g("fl.dir")`*flex-direction: %arg;`,g("fl.flow")`*flex-flow: %arg;`,g("fl.grow")`*flex-grow: %arg;`,g("fl.main")`*justify-content: %arg;`,g("fl.shrink")`*flex-shrink: %arg;`,g("fl.size")`*flex: %arg;`,g("fl.wr")`*flex-wrap: %arg;`,g("font")`*font-family: %arg;`,g("gap")`*gap: %arg;`,g("gap.col")`*column-gap: %arg;`,g("gap.row")`*row-gap: %arg;`,g("gr.areas")`*grid-template-areas: %arg;`,g("gr.cols")`*grid-template-columns: %arg;`,g("gr.cols.a")`*grid-auto-columns: %arg;`,g("gr.flow")`*grid-auto-flow: %arg;`,g("gr.rows")`*grid-template-rows: %arg;`,g("gr.rows.a")`*grid-auto-rows: %arg;`,g("h")`*height: %arg;`,g("h.max")`*max-height: %arg;`,g("h.min")`*min-height: %arg;`,g("inset")`*top: %arg; *left: %arg; *bottom: %arg; *right: %arg;`,g("inset.x")`*left: %arg; *right: %arg;`,g("inset.y")`*top: %arg; *bottom: %arg;`,g("m")`*margin: %arg;`,g("m.b")`*margin-bottom: %arg;`,g("m.l")`*margin-left: %arg;`,g("m.r")`*margin-right: %arg;`,g("m.t")`*margin-top: %arg;`,g("m.x")`*margin-left: %arg; *margin-right: %arg;`,g("m.y")`*margin-bottom: %arg; *margin-top: %arg;`,g("o")`*opacity: %arg;`,g("outln")`*outline: %arg;`,g("over")`*overflow: %arg;`,g("over.x")`*overflow-x: %arg;`,g("over.y")`*overflow-y: %arg;`,g("p")`*padding: %arg;`,g("p.b")`*padding-bottom: %arg;`,g("p.l")`*padding-left: %arg;`,g("p.r")`*padding-right: %arg;`,g("p.t")`*padding-top: %arg;`,g("p.x")`*padding-left: %arg; *padding-right: %arg;`,g("p.y")`*padding-top: %arg; *padding-bottom: %arg;`,g("pos")`*position: %arg;`,g("pos.abs")`*position: absolute;`,g("pos.fix")`*position: fixed;`,g("pos.rel")`*position: relative;`,g("pos.stick")`*position: sticky;`,g("r")`*border-radius: %arg;`,g("r.b")`*border-bottom-left-radius: %arg; *border-bottom-right-radius: %arg;`,g("r.bl")`*border-bottom-left-radius: %arg;`,g("r.br")`*border-bottom-right-radius: %arg;`,g("r.l")`*border-top-left-radius: %arg; *border-bottom-left-radius: %arg;`,g("r.r")`*border-top-right-radius: %arg; *border-bottom-right-radius: %arg;`,g("r.t")`*border-top-left-radius: %arg; *border-top-right-radius: %arg;`,g("r.tl")`*border-top-left-radius: %arg;`,g("r.tr")`*border-top-right-radius: %arg;`,g("row")`*grid-row: %arg;`,g("sel")`*user-select: %arg;`,g("self.cross")`*align-self: %arg;`,g("self.main")`*justify-self: %arg;`,g("sh.box")`*box-shadow: %arg;`,g("sh.text")`*text-shadow: %arg;`,g("t.a")`*text-align: %arg;`,g("t.br")`*word-break: %arg;`,g("t.c")`*color: %arg;`,g("t.deco")`*text-decoration: %arg;`,g("t.lh")`*line-height: %arg;`,g("t.over")`*text-overflow: %arg;`,g("t.st")`*font-style: %arg;`,g("t.sz")`*font-size: %arg;`,g("t.tf")`*text-transform: %arg;`,g("t.var")`*font-variant: %arg;`,g("t.wrap")`*word-wrap: %arg;`,g("t.ws")`*white-space: %arg;`,g("t.wt")`*font-weight: %arg;`,g("tf")`*transform: %arg;`,g("tf.o")`*transform-origin: %arg;`,g("tf.p")`*perspective: %arg;`,g("tr")`*transition: %arg;`,g("v.a")`*vertical-align: %arg;`,g("vis")`*visibility: %arg;`,g("w")`*width: %arg;`,g("w.max")`*max-width: %arg;`,g("w.min")`*min-width: %arg;`,g("x")`*left: %arg;`,g("-x")`*right: %arg;`,g("y")`*top: %arg;`,g("-y")`*bottom: %arg;`,g("z")`*z-index: %arg;`,g("fl.cn")`fl.cross: center; fl.main: center;`,g("fl.cn.cross")`fl.cross: center;`,g("fl.cn.main")`fl.main: center;`,g("flex")`disp: flex; fl.dir: %arg;`,g("grid")`disp: grid; gr.flow: %arg;`,g("hide")`disp: none;`,g("invis")`vis: hidden;`,g("sticky")`pos: sticky; y: 0px; z: +1;`,g("adorn")`disp: flex; fl.cn; p: 4px;`,g("pad.compact")`p: 0px 4px;`,g("variant.outline")`b.w: 1px;`,g("variant.fill")`@text-color: @alt-color; @fill-color: @core-color; @active: @alt-color;`,g("variant.lined")`b.w: 0px; b.b.w: @border-size; r.b: 0px;`,g("gr.cols-fit")`*grid-template-columns: repeat(auto-fit, minmax(%arg));`,g("gr.cols-fill")`*grid-template-columns: repeat(auto-fill, minmax(%arg));`,g("text.subtitle")`t.sz: @text-size-subtitle; flex; fl.main: center; p: 0px 8px;`,g("text.title")`t.sz: @text-size-title; flex; fl.main: center; p: 4px 8px;`,g("elevate")`sh.box: 0px 2px 3px @shadow-color;`,g("#animate")`
1
+ var ws=function(r){"use strict";const t=Symbol("no match"),e=(r,e)=>{const o=e=>{const o=e.length;return()=>e===r.substr(R,o)?(R+=o,e):t},a=e=>()=>{const o=r.charAt(R);return!1!==e.test(o)?(R+=1,o):t};let n=null;const l=o("@"),i=o(":"),s=a(/[^;]/),g=o(";"),u=o("*"),d=a(/[a-z0-9_\-]/i),c=o("!"),f=a(/[^{]/),b=o("{"),p=o("}"),m=a(/[a-zA-Z0-9\.\-_#\^\$\/]/),w=o("#"),h=a(/[^;#]/),x=a(/[\s]/m),y=()=>{const r=R;let e=null,o=null;return(e=q())===t||(o=z())===t?(R=r,t):[e,o]},v=()=>{const e=R;let o=null,a=null;return(o=w())===t||(a=(()=>{const e=R,o=R;for(;h()!==t;);return R-o==0?t:r.slice(e,R)})())===t?(R=e,t):[o,a]},$=()=>{n="rules";let r=R,e=null;const o=[];let a=null;for(;(a=y())!==t;)o.push(a);if(e=o,q()===t)return R=r,t;return e.map((r=>r[1]))},z=()=>{let r=null;return(r=k())!==t||(r=j())!==t||(r=A())!==t||(r=S())!==t?r:t},k=()=>{n="rule$0";let r=R,e=null;if((e=E())===t)return R=r,t;return e},j=()=>{n="rule$1";let r=R,e=null;if((e=N())===t)return R=r,t;return e},A=()=>{n="rule$2";let r=R,e=null;if((e=M())===t)return R=r,t;return e},S=()=>{n="rule$3";let r=R,e=null;if((e=V())===t)return R=r,t;return e},E=()=>{n="variable";let e=R,o=null,a=null;if(l()===t)return R=e,t;if((o=O())===t)return R=e,t;if(i()===t)return R=e,t;if(q()===t)return R=e,t;if((a=(()=>{const e=R,o=R;for(;s()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;if(g()===t)return R=e,t;return((r,t)=>({type:"var",name:r,value:t}))(o,a)},N=()=>{n="css";let e=R,o=null,a=null;if(u()===t)return R=e,t;if((o=O())===t)return R=e,t;if(i()===t)return R=e,t;if(q()===t)return R=e,t;if((a=(()=>{const e=R,o=R;for(;s()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;if(g()===t)return R=e,t;return((r,t)=>({type:"css",name:r,value:t}))(o,a)},O=()=>{n="cssName";let e=R,o=null;if((o=(()=>{const e=R,o=R;for(;d()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;return o},M=()=>{n="subrule";let e=R,o=null,a=null;if(c()===t)return R=e,t;if(q()===t)return R=e,t;if((o=(()=>{const e=R,o=R;for(;f()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;if(b()===t)return R=e,t;if((a=$())===t)return R=e,t;if(p()===t)return R=e,t;var l;return l=a,{type:"alt",selector:o.trim(),rules:l}},V=()=>{n="macro";let e=R,o=null,a=null;if((o=(()=>{const e=R,o=R;for(;m()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;const l=(()=>{const r=R;let e=null,o=null,a=null;return(e=i())===t||(o=q())===t||(a=F())===t?(R=r,t):[e,o,a]})();if(a=l===t?null:l,g()===t)return R=e,t;return((r,t)=>({type:"macro",name:r,value:t?.[2]}))(o,a)},F=()=>{let r=null;return(r=L())!==t||(r=_())!==t?r:t},L=()=>{n="macroValue$0";let r=null;const e=[];let o=null;for(;(o=v())!==t;)e.push(o);if(0===e.length)return t;r=e;return(r=>{const t=r.map((r=>r[1].trim()));return t.arg=t.join(" "),t})(r)},_=()=>{n="macroValue$1";let e=R,o=null;if((o=(()=>{const e=R,o=R;for(;s()!==t;);return R-o==0?t:r.slice(e,R)})())===t)return R=e,t;return(r=>{const t=[r.trim()];return t.arg=r,t})(o)},q=()=>{for(n="_";x()!==t;);};let R=0;const C=(()=>{n="$";let r=R,e=null;if((e=$())===t)return R=r,t;return e})();return R!==r.length?(console.log("last",n),console.log("@",R),console.log(r.slice(R-10,R+10)),new Error("End of input not found")):C},o=document.createElement("style");o.setAttribute("data-name","windstorm-generated"),o.innerHTML="@layer ws.custom ws.macro ws.user;",document.head.append(o);const a=(r,...t)=>{const o=String.raw(r,...t);return n(e(o),{"&":[]},"&")},n=(r,t,e)=>{for(const o of r)i(o,t,e);return t},l=r=>r.replace(/@([a-zA-Z0-9\-_]+)/g,((r,t)=>`var(--${t})`)),i=(r,t,e)=>{if("var"===r.type)return void t[e].push(`--${r.name}: ${l(r.value)};`);if("css"===r.type)return void t[e].push(`${r.name}: ${l(r.value)};`);if("macro"===r.type){const o=s[r.name];if(void 0===o)return void console.warn(`no macro for "${r.name}"`);for(const[a,n]of Object.entries(o)){const o=a.replace("&",e);t[o]=t[o]??[],t[o].push(...n.map((t=>l(t.replace(/%(arg|\d+)/g,((t,e)=>r.value?.[e]??""))))))}return}const o=r.selector.replaceAll("&",e);t[o]=[...t[o]??[]],n(r.rules,t,o)},s={},g=r=>(t,...e)=>s[r]=a(t,...e),u=r=>Object.entries(r).reduce(((r,[t,e])=>{if(!0===t.startsWith("|")){const o=t.lastIndexOf("|"),a=[`@media (${t.slice(1,o)}) {`,`${`&${t.slice(o+1)}`} {`,...e,"}","}"].join("\n");return r.push(a),r}return r.push(`${t} {\n${e.join("\n")}\n}`),r}),[]);const d={attr:"ws-x",origin:"https://wind-cdn.axel669.net",...window.wsConfig,version:"1.0.0-beta.1",fontVersion:"2",iconVersion:"3.34.0"},c={},f=async(r,t)=>{const e=c[t],o=`ws-icon-${t}`;if(void 0!==e){if(await e.loaded,"loaded"!==e.status||null===r)return;return void r.style.setProperty("--icon-font",o)}const a=new FontFace(o,`url(${d.origin}/icon/${t}.woff?v${d.iconVersion})`);c[t]=a;try{await a.load()}catch(r){console.error(r)}document.fonts.add(a),f(r,t)},b=r=>{if(void 0===r.tagName)return;const t=r.dataset.icon??null;null!==t&&f(r,t)},p={childList(r){0!==r.addedNodes.length&&r.addedNodes.forEach((r=>{if(void 0===r.tagName)return;[r,...r.querySelectorAll("*")].forEach(b)}))},attributes(r){b(r.target)}};new MutationObserver((r=>r.forEach((r=>p[r.type](r))))).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-icon"]});g("appr")`*apperance: %arg; *-webkit-appearance: %arg;`,g("area")`*grid-area: %arg;`,g("b")`*border: %arg;`,g("b.b")`*border-bottom: %arg;`,g("b.b.c")`*border-bottom-color: %arg;`,g("b.b.s")`*border-bottom-style: %arg;`,g("b.b.w")`*border-bottom-width: %arg;`,g("b.c")`*border-color: %arg;`,g("b.l")`*border-left: %arg;`,g("b.l.c")`*border-left-color: %arg;`,g("b.l.s")`*border-left-style: %arg;`,g("b.l.w")`*border-left-width: %arg;`,g("b.r")`*border-right: %arg;`,g("b.r.c")`*border-right-color: %arg;`,g("b.r.s")`*border-right-style: %arg;`,g("b.r.w")`*border-right-width: %arg;`,g("b.s")`*border-style: %arg;`,g("b.t")`*border-top: %arg;`,g("b.t.c")`*border-top-color: %arg;`,g("b.t.s")`*border-top-style: %arg;`,g("b.t.w")`*border-top-width: %arg;`,g("b.w")`*border-width: %arg;`,g("b.x")`*border-left: %arg; *border-right: %arg;`,g("b.x.c")`*border-left-color: %arg; *border-right-color: %arg;`,g("b.x.s")`*border-left-style: %arg; *border-right-style: %arg;`,g("b.x.w")`*border-left-width: %arg; *border-right-width: %arg;`,g("b.y")`*border-top: %arg; *border-bottom: %arg;`,g("b.y.c")`*border-top-color: %arg; *border-bottom-color: %arg;`,g("b.y.s")`*border-top-style: %arg; *border-bottom-style: %arg;`,g("b.y.w")`*border-top-width: %arg; *border-bottom-width: %arg;`,g("bg")`*background: %arg;`,g("bg.att")`*background-attachment: %arg;`,g("bg.c")`*background-color: %arg;`,g("bg.img")`*background-image: %arg;`,g("bg.pos")`*background-position: %arg;`,g("bg.rep")`*background-repeat: %arg;`,g("bg.sz")`*background-size: %arg;`,g("c")`*color: %arg;`,g("col")`*grid-column: %arg;`,g("cur")`*cursor: %arg;`,g("disp")`*display: %arg;`,g("fl.basis")`*flex-basis: %arg;`,g("fl.cross")`*align-items: %arg;`,g("fl.dir")`*flex-direction: %arg;`,g("fl.flow")`*flex-flow: %arg;`,g("fl.grow")`*flex-grow: %arg;`,g("fl.main")`*justify-content: %arg;`,g("fl.shrink")`*flex-shrink: %arg;`,g("fl.size")`*flex: %arg;`,g("fl.wr")`*flex-wrap: %arg;`,g("font")`*font-family: %arg;`,g("gap")`*gap: %arg;`,g("gap.col")`*column-gap: %arg;`,g("gap.row")`*row-gap: %arg;`,g("gr.areas")`*grid-template-areas: %arg;`,g("gr.cols")`*grid-template-columns: %arg;`,g("gr.cols.a")`*grid-auto-columns: %arg;`,g("gr.flow")`*grid-auto-flow: %arg;`,g("gr.rows")`*grid-template-rows: %arg;`,g("gr.rows.a")`*grid-auto-rows: %arg;`,g("h")`*height: %arg;`,g("h.max")`*max-height: %arg;`,g("h.min")`*min-height: %arg;`,g("inset")`*top: %arg; *left: %arg; *bottom: %arg; *right: %arg;`,g("inset.x")`*left: %arg; *right: %arg;`,g("inset.y")`*top: %arg; *bottom: %arg;`,g("m")`*margin: %arg;`,g("m.b")`*margin-bottom: %arg;`,g("m.l")`*margin-left: %arg;`,g("m.r")`*margin-right: %arg;`,g("m.t")`*margin-top: %arg;`,g("m.x")`*margin-left: %arg; *margin-right: %arg;`,g("m.y")`*margin-bottom: %arg; *margin-top: %arg;`,g("o")`*opacity: %arg;`,g("outln")`*outline: %arg;`,g("over")`*overflow: %arg;`,g("over.x")`*overflow-x: %arg;`,g("over.y")`*overflow-y: %arg;`,g("p")`*padding: %arg;`,g("p.b")`*padding-bottom: %arg;`,g("p.l")`*padding-left: %arg;`,g("p.r")`*padding-right: %arg;`,g("p.t")`*padding-top: %arg;`,g("p.x")`*padding-left: %arg; *padding-right: %arg;`,g("p.y")`*padding-top: %arg; *padding-bottom: %arg;`,g("pos")`*position: %arg;`,g("pos.abs")`*position: absolute;`,g("pos.fix")`*position: fixed;`,g("pos.rel")`*position: relative;`,g("pos.stick")`*position: sticky;`,g("r")`*border-radius: %arg;`,g("r.b")`*border-bottom-left-radius: %arg; *border-bottom-right-radius: %arg;`,g("r.bl")`*border-bottom-left-radius: %arg;`,g("r.br")`*border-bottom-right-radius: %arg;`,g("r.l")`*border-top-left-radius: %arg; *border-bottom-left-radius: %arg;`,g("r.r")`*border-top-right-radius: %arg; *border-bottom-right-radius: %arg;`,g("r.t")`*border-top-left-radius: %arg; *border-top-right-radius: %arg;`,g("r.tl")`*border-top-left-radius: %arg;`,g("r.tr")`*border-top-right-radius: %arg;`,g("row")`*grid-row: %arg;`,g("sel")`*user-select: %arg;`,g("self.cross")`*align-self: %arg;`,g("self.main")`*justify-self: %arg;`,g("sh.box")`*box-shadow: %arg;`,g("sh.text")`*text-shadow: %arg;`,g("t.a")`*text-align: %arg;`,g("t.br")`*word-break: %arg;`,g("t.c")`*color: %arg;`,g("t.deco")`*text-decoration: %arg;`,g("t.lh")`*line-height: %arg;`,g("t.over")`*text-overflow: %arg;`,g("t.st")`*font-style: %arg;`,g("t.sz")`*font-size: %arg;`,g("t.tf")`*text-transform: %arg;`,g("t.var")`*font-variant: %arg;`,g("t.wrap")`*word-wrap: %arg;`,g("t.ws")`*white-space: %arg;`,g("t.wt")`*font-weight: %arg;`,g("tf")`*transform: %arg;`,g("tf.o")`*transform-origin: %arg;`,g("tf.p")`*perspective: %arg;`,g("tr")`*transition: %arg;`,g("v.a")`*vertical-align: %arg;`,g("vis")`*visibility: %arg;`,g("w")`*width: %arg;`,g("w.max")`*max-width: %arg;`,g("w.min")`*min-width: %arg;`,g("x")`*left: %arg;`,g("-x")`*right: %arg;`,g("y")`*top: %arg;`,g("-y")`*bottom: %arg;`,g("z")`*z-index: %arg;`,g("fl.cn")`fl.cross: center; fl.main: center;`,g("fl.cn.cross")`fl.cross: center;`,g("fl.cn.main")`fl.main: center;`,g("flex")`disp: flex; fl.dir: %arg;`,g("grid")`disp: grid; gr.flow: %arg;`,g("hide")`disp: none;`,g("invis")`vis: hidden;`,g("sticky")`pos: sticky; y: 0px; z: +1;`,g("adorn")`disp: flex; fl.cn; p: 4px;`,g("pad.compact")`p: 0px 4px;`,g("variant.outline")`b.w: 1px;`,g("variant.fill")`@text-color: @alt-color; @fill-color: @core-color; @active: @alt-color;`,g("variant.lined")`b.w: 0px; b.b.w: @border-size; r.b: 0px;`,g("gr.cols-fit")`*grid-template-columns: repeat(auto-fit, minmax(%arg));`,g("gr.cols-fill")`*grid-template-columns: repeat(auto-fill, minmax(%arg));`,g("text.subtitle")`t.sz: @text-size-subtitle; flex; fl.main: center; p: 0px 8px;`,g("text.title")`t.sz: @text-size-title; flex; fl.main: center; p: 4px 8px;`,g("elevate")`sh.box: 0px 2px 3px @shadow-color;`,g("#animate")`
2
2
  @modal-transition: visibility @anim-time linear;
3
3
  ! & ws-dialog {
4
4
  o: 0;
package/dist/ws-nc-esm.js CHANGED
@@ -1,4 +1,4 @@
1
- const r=Symbol("no match"),t=(t,e)=>{const o=e=>{const o=e.length;return()=>e===t.substr(R,o)?(R+=o,e):r},a=e=>()=>{const o=t.charAt(R);return!1!==e.test(o)?(R+=1,o):r};let n=null;const l=o("@"),i=o(":"),s=a(/[^;]/),g=o(";"),u=o("*"),d=a(/[a-z0-9_\-]/i),c=o("!"),f=a(/[^{]/),b=o("{"),p=o("}"),m=a(/[a-zA-Z0-9\.\-_#\^\$\/]/),w=o("#"),h=a(/[^;#]/),x=a(/[\s]/m),y=()=>{const t=R;let e=null,o=null;return(e=q())===r||(o=z())===r?(R=t,r):[e,o]},v=()=>{const e=R;let o=null,a=null;return(o=w())===r||(a=(()=>{const e=R,o=R;for(;h()!==r;);return R-o==0?r:t.slice(e,R)})())===r?(R=e,r):[o,a]},$=()=>{n="rules";let t=R,e=null;const o=[];let a=null;for(;(a=y())!==r;)o.push(a);if(e=o,q()===r)return R=t,r;return e.map((r=>r[1]))},z=()=>{let t=null;return(t=k())!==r||(t=j())!==r||(t=A())!==r||(t=S())!==r?t:r},k=()=>{n="rule$0";let t=R,e=null;if((e=E())===r)return R=t,r;return e},j=()=>{n="rule$1";let t=R,e=null;if((e=N())===r)return R=t,r;return e},A=()=>{n="rule$2";let t=R,e=null;if((e=V())===r)return R=t,r;return e},S=()=>{n="rule$3";let t=R,e=null;if((e=F())===r)return R=t,r;return e},E=()=>{n="variable";let e=R,o=null,a=null;if(l()===r)return R=e,r;if((o=O())===r)return R=e,r;if(i()===r)return R=e,r;if(q()===r)return R=e,r;if((a=(()=>{const e=R,o=R;for(;s()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;if(g()===r)return R=e,r;return((r,t)=>({type:"var",name:r,value:t}))(o,a)},N=()=>{n="css";let e=R,o=null,a=null;if(u()===r)return R=e,r;if((o=O())===r)return R=e,r;if(i()===r)return R=e,r;if(q()===r)return R=e,r;if((a=(()=>{const e=R,o=R;for(;s()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;if(g()===r)return R=e,r;return((r,t)=>({type:"css",name:r,value:t}))(o,a)},O=()=>{n="cssName";let e=R,o=null;if((o=(()=>{const e=R,o=R;for(;d()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;return o},V=()=>{n="subrule";let e=R,o=null,a=null;if(c()===r)return R=e,r;if(q()===r)return R=e,r;if((o=(()=>{const e=R,o=R;for(;f()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;if(b()===r)return R=e,r;if((a=$())===r)return R=e,r;if(p()===r)return R=e,r;var l;return l=a,{type:"alt",selector:o.trim(),rules:l}},F=()=>{n="macro";let e=R,o=null,a=null;if((o=(()=>{const e=R,o=R;for(;m()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;const l=(()=>{const t=R;let e=null,o=null,a=null;return(e=i())===r||(o=q())===r||(a=L())===r?(R=t,r):[e,o,a]})();if(a=l===r?null:l,g()===r)return R=e,r;return((r,t)=>({type:"macro",name:r,value:t?.[2]}))(o,a)},L=()=>{let t=null;return(t=M())!==r||(t=_())!==r?t:r},M=()=>{n="macroValue$0";let t=null;const e=[];let o=null;for(;(o=v())!==r;)e.push(o);if(0===e.length)return r;t=e;return(r=>{const t=r.map((r=>r[1].trim()));return t.arg=t.join(" "),t})(t)},_=()=>{n="macroValue$1";let e=R,o=null;if((o=(()=>{const e=R,o=R;for(;s()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;return(r=>{const t=[r.trim()];return t.arg=r,t})(o)},q=()=>{for(n="_";x()!==r;);};let R=0;const C=(()=>{n="$";let t=R,e=null;if((e=$())===r)return R=t,r;return e})();return R!==t.length?(console.log("last",n),console.log("@",R),console.log(t.slice(R-10,R+10)),new Error("End of input not found")):C},e=document.createElement("style");e.setAttribute("data-name","windstorm-generated"),e.innerHTML="@layer ws.custom ws.macro ws.user;",document.head.append(e);const o=(r,...e)=>{const o=String.raw(r,...e);return a(t(o),{"&":[]},"&")},a=(r,t,e)=>{for(const o of r)l(o,t,e);return t},n=r=>r.replace(/@([a-zA-Z0-9\-_]+)/g,((r,t)=>`var(--${t})`)),l=(r,t,e)=>{if("var"===r.type)return void t[e].push(`--${r.name}: ${n(r.value)};`);if("css"===r.type)return void t[e].push(`${r.name}: ${n(r.value)};`);if("macro"===r.type){const o=i[r.name];if(void 0===o)return void console.warn(`no macro for "${r.name}"`);for(const[a,l]of Object.entries(o)){const o=a.replace("&",e);t[o]=t[o]??[],t[o].push(...l.map((t=>n(t.replace(/%(arg|\d+)/g,((t,e)=>r.value?.[e]??""))))))}return}const o=r.selector.replaceAll("&",e);t[o]=[...t[o]??[]],a(r.rules,t,o)},i={},s=r=>(t,...e)=>i[r]=o(t,...e),g=r=>Object.entries(r).reduce(((r,[t,e])=>{if(!0===t.startsWith("|")){const o=t.lastIndexOf("|"),a=[`@media (${t.slice(1,o)}) {`,`${`&${t.slice(o+1)}`} {`,...e,"}","}"].join("\n");return r.push(a),r}return r.push(`${t} {\n${e.join("\n")}\n}`),r}),[]),u=(r,t="ws.custom")=>(a,...n)=>{const l=o(a,...n),i=g(l).map((t=>t.replaceAll("&",r))),s=`@layer ${t} { ${i.join("\n")} }`;e.sheet.insertRule(s)};const d={attr:"ws-x",origin:"https://wind-cdn.axel669.net",...window.wsConfig,version:"1.0.0-beta.0",fontVersion:"2",iconVersion:"3.34.0"},c={},f=async(r,t)=>{const e=c[t],o=`ws-icon-${t}`;if(void 0!==e){if(await e.loaded,"loaded"!==e.status||null===r)return;return void r.style.setProperty("--icon-font",o)}const a=new FontFace(o,`url(${d.origin}/icon/${t}.woff?v${d.iconVersion})`);c[t]=a;try{await a.load()}catch(r){console.error(r)}document.fonts.add(a),f(r,t)},b=r=>{if(void 0===r.tagName)return;const t=r.dataset.icon??null;null!==t&&f(r,t)},p={childList(r){0!==r.addedNodes.length&&r.addedNodes.forEach((r=>{if(void 0===r.tagName)return;[r,...r.querySelectorAll("*")].forEach(b)}))},attributes(r){b(r.target)}};new MutationObserver((r=>r.forEach((r=>p[r.type](r))))).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-icon"]});const m=(...r)=>{for(const t of r)f(null,t)};s("appr")`*apperance: %arg; *-webkit-appearance: %arg;`,s("area")`*grid-area: %arg;`,s("b")`*border: %arg;`,s("b.b")`*border-bottom: %arg;`,s("b.b.c")`*border-bottom-color: %arg;`,s("b.b.s")`*border-bottom-style: %arg;`,s("b.b.w")`*border-bottom-width: %arg;`,s("b.c")`*border-color: %arg;`,s("b.l")`*border-left: %arg;`,s("b.l.c")`*border-left-color: %arg;`,s("b.l.s")`*border-left-style: %arg;`,s("b.l.w")`*border-left-width: %arg;`,s("b.r")`*border-right: %arg;`,s("b.r.c")`*border-right-color: %arg;`,s("b.r.s")`*border-right-style: %arg;`,s("b.r.w")`*border-right-width: %arg;`,s("b.s")`*border-style: %arg;`,s("b.t")`*border-top: %arg;`,s("b.t.c")`*border-top-color: %arg;`,s("b.t.s")`*border-top-style: %arg;`,s("b.t.w")`*border-top-width: %arg;`,s("b.w")`*border-width: %arg;`,s("b.x")`*border-left: %arg; *border-right: %arg;`,s("b.x.c")`*border-left-color: %arg; *border-right-color: %arg;`,s("b.x.s")`*border-left-style: %arg; *border-right-style: %arg;`,s("b.x.w")`*border-left-width: %arg; *border-right-width: %arg;`,s("b.y")`*border-top: %arg; *border-bottom: %arg;`,s("b.y.c")`*border-top-color: %arg; *border-bottom-color: %arg;`,s("b.y.s")`*border-top-style: %arg; *border-bottom-style: %arg;`,s("b.y.w")`*border-top-width: %arg; *border-bottom-width: %arg;`,s("bg")`*background: %arg;`,s("bg.att")`*background-attachment: %arg;`,s("bg.c")`*background-color: %arg;`,s("bg.img")`*background-image: %arg;`,s("bg.pos")`*background-position: %arg;`,s("bg.rep")`*background-repeat: %arg;`,s("bg.sz")`*background-size: %arg;`,s("c")`*color: %arg;`,s("col")`*grid-column: %arg;`,s("cur")`*cursor: %arg;`,s("disp")`*display: %arg;`,s("fl.basis")`*flex-basis: %arg;`,s("fl.cross")`*align-items: %arg;`,s("fl.dir")`*flex-direction: %arg;`,s("fl.flow")`*flex-flow: %arg;`,s("fl.grow")`*flex-grow: %arg;`,s("fl.main")`*justify-content: %arg;`,s("fl.shrink")`*flex-shrink: %arg;`,s("fl.size")`*flex: %arg;`,s("fl.wr")`*flex-wrap: %arg;`,s("font")`*font-family: %arg;`,s("gap")`*gap: %arg;`,s("gap.col")`*column-gap: %arg;`,s("gap.row")`*row-gap: %arg;`,s("gr.areas")`*grid-template-areas: %arg;`,s("gr.cols")`*grid-template-columns: %arg;`,s("gr.cols.a")`*grid-auto-columns: %arg;`,s("gr.flow")`*grid-auto-flow: %arg;`,s("gr.rows")`*grid-template-rows: %arg;`,s("gr.rows.a")`*grid-auto-rows: %arg;`,s("h")`*height: %arg;`,s("h.max")`*max-height: %arg;`,s("h.min")`*min-height: %arg;`,s("inset")`*top: %arg; *left: %arg; *bottom: %arg; *right: %arg;`,s("inset.x")`*left: %arg; *right: %arg;`,s("inset.y")`*top: %arg; *bottom: %arg;`,s("m")`*margin: %arg;`,s("m.b")`*margin-bottom: %arg;`,s("m.l")`*margin-left: %arg;`,s("m.r")`*margin-right: %arg;`,s("m.t")`*margin-top: %arg;`,s("m.x")`*margin-left: %arg; *margin-right: %arg;`,s("m.y")`*margin-bottom: %arg; *margin-top: %arg;`,s("o")`*opacity: %arg;`,s("outln")`*outline: %arg;`,s("over")`*overflow: %arg;`,s("over.x")`*overflow-x: %arg;`,s("over.y")`*overflow-y: %arg;`,s("p")`*padding: %arg;`,s("p.b")`*padding-bottom: %arg;`,s("p.l")`*padding-left: %arg;`,s("p.r")`*padding-right: %arg;`,s("p.t")`*padding-top: %arg;`,s("p.x")`*padding-left: %arg; *padding-right: %arg;`,s("p.y")`*padding-top: %arg; *padding-bottom: %arg;`,s("pos")`*position: %arg;`,s("pos.abs")`*position: absolute;`,s("pos.fix")`*position: fixed;`,s("pos.rel")`*position: relative;`,s("pos.stick")`*position: sticky;`,s("r")`*border-radius: %arg;`,s("r.b")`*border-bottom-left-radius: %arg; *border-bottom-right-radius: %arg;`,s("r.bl")`*border-bottom-left-radius: %arg;`,s("r.br")`*border-bottom-right-radius: %arg;`,s("r.l")`*border-top-left-radius: %arg; *border-bottom-left-radius: %arg;`,s("r.r")`*border-top-right-radius: %arg; *border-bottom-right-radius: %arg;`,s("r.t")`*border-top-left-radius: %arg; *border-top-right-radius: %arg;`,s("r.tl")`*border-top-left-radius: %arg;`,s("r.tr")`*border-top-right-radius: %arg;`,s("row")`*grid-row: %arg;`,s("sel")`*user-select: %arg;`,s("self.cross")`*align-self: %arg;`,s("self.main")`*justify-self: %arg;`,s("sh.box")`*box-shadow: %arg;`,s("sh.text")`*text-shadow: %arg;`,s("t.a")`*text-align: %arg;`,s("t.br")`*word-break: %arg;`,s("t.c")`*color: %arg;`,s("t.deco")`*text-decoration: %arg;`,s("t.lh")`*line-height: %arg;`,s("t.over")`*text-overflow: %arg;`,s("t.st")`*font-style: %arg;`,s("t.sz")`*font-size: %arg;`,s("t.tf")`*text-transform: %arg;`,s("t.var")`*font-variant: %arg;`,s("t.wrap")`*word-wrap: %arg;`,s("t.ws")`*white-space: %arg;`,s("t.wt")`*font-weight: %arg;`,s("tf")`*transform: %arg;`,s("tf.o")`*transform-origin: %arg;`,s("tf.p")`*perspective: %arg;`,s("tr")`*transition: %arg;`,s("v.a")`*vertical-align: %arg;`,s("vis")`*visibility: %arg;`,s("w")`*width: %arg;`,s("w.max")`*max-width: %arg;`,s("w.min")`*min-width: %arg;`,s("x")`*left: %arg;`,s("-x")`*right: %arg;`,s("y")`*top: %arg;`,s("-y")`*bottom: %arg;`,s("z")`*z-index: %arg;`,s("fl.cn")`fl.cross: center; fl.main: center;`,s("fl.cn.cross")`fl.cross: center;`,s("fl.cn.main")`fl.main: center;`,s("flex")`disp: flex; fl.dir: %arg;`,s("grid")`disp: grid; gr.flow: %arg;`,s("hide")`disp: none;`,s("invis")`vis: hidden;`,s("sticky")`pos: sticky; y: 0px; z: +1;`,s("adorn")`disp: flex; fl.cn; p: 4px;`,s("pad.compact")`p: 0px 4px;`,s("variant.outline")`b.w: 1px;`,s("variant.fill")`@text-color: @alt-color; @fill-color: @core-color; @active: @alt-color;`,s("variant.lined")`b.w: 0px; b.b.w: @border-size; r.b: 0px;`,s("gr.cols-fit")`*grid-template-columns: repeat(auto-fit, minmax(%arg));`,s("gr.cols-fill")`*grid-template-columns: repeat(auto-fill, minmax(%arg));`,s("text.subtitle")`t.sz: @text-size-subtitle; flex; fl.main: center; p: 0px 8px;`,s("text.title")`t.sz: @text-size-title; flex; fl.main: center; p: 4px 8px;`,s("elevate")`sh.box: 0px 2px 3px @shadow-color;`,s("#animate")`
1
+ const r=Symbol("no match"),t=(t,e)=>{const o=e=>{const o=e.length;return()=>e===t.substr(R,o)?(R+=o,e):r},a=e=>()=>{const o=t.charAt(R);return!1!==e.test(o)?(R+=1,o):r};let n=null;const l=o("@"),i=o(":"),s=a(/[^;]/),g=o(";"),u=o("*"),d=a(/[a-z0-9_\-]/i),c=o("!"),f=a(/[^{]/),b=o("{"),p=o("}"),m=a(/[a-zA-Z0-9\.\-_#\^\$\/]/),w=o("#"),h=a(/[^;#]/),x=a(/[\s]/m),y=()=>{const t=R;let e=null,o=null;return(e=q())===r||(o=z())===r?(R=t,r):[e,o]},v=()=>{const e=R;let o=null,a=null;return(o=w())===r||(a=(()=>{const e=R,o=R;for(;h()!==r;);return R-o==0?r:t.slice(e,R)})())===r?(R=e,r):[o,a]},$=()=>{n="rules";let t=R,e=null;const o=[];let a=null;for(;(a=y())!==r;)o.push(a);if(e=o,q()===r)return R=t,r;return e.map((r=>r[1]))},z=()=>{let t=null;return(t=k())!==r||(t=j())!==r||(t=A())!==r||(t=S())!==r?t:r},k=()=>{n="rule$0";let t=R,e=null;if((e=E())===r)return R=t,r;return e},j=()=>{n="rule$1";let t=R,e=null;if((e=N())===r)return R=t,r;return e},A=()=>{n="rule$2";let t=R,e=null;if((e=V())===r)return R=t,r;return e},S=()=>{n="rule$3";let t=R,e=null;if((e=F())===r)return R=t,r;return e},E=()=>{n="variable";let e=R,o=null,a=null;if(l()===r)return R=e,r;if((o=O())===r)return R=e,r;if(i()===r)return R=e,r;if(q()===r)return R=e,r;if((a=(()=>{const e=R,o=R;for(;s()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;if(g()===r)return R=e,r;return((r,t)=>({type:"var",name:r,value:t}))(o,a)},N=()=>{n="css";let e=R,o=null,a=null;if(u()===r)return R=e,r;if((o=O())===r)return R=e,r;if(i()===r)return R=e,r;if(q()===r)return R=e,r;if((a=(()=>{const e=R,o=R;for(;s()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;if(g()===r)return R=e,r;return((r,t)=>({type:"css",name:r,value:t}))(o,a)},O=()=>{n="cssName";let e=R,o=null;if((o=(()=>{const e=R,o=R;for(;d()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;return o},V=()=>{n="subrule";let e=R,o=null,a=null;if(c()===r)return R=e,r;if(q()===r)return R=e,r;if((o=(()=>{const e=R,o=R;for(;f()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;if(b()===r)return R=e,r;if((a=$())===r)return R=e,r;if(p()===r)return R=e,r;var l;return l=a,{type:"alt",selector:o.trim(),rules:l}},F=()=>{n="macro";let e=R,o=null,a=null;if((o=(()=>{const e=R,o=R;for(;m()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;const l=(()=>{const t=R;let e=null,o=null,a=null;return(e=i())===r||(o=q())===r||(a=L())===r?(R=t,r):[e,o,a]})();if(a=l===r?null:l,g()===r)return R=e,r;return((r,t)=>({type:"macro",name:r,value:t?.[2]}))(o,a)},L=()=>{let t=null;return(t=M())!==r||(t=_())!==r?t:r},M=()=>{n="macroValue$0";let t=null;const e=[];let o=null;for(;(o=v())!==r;)e.push(o);if(0===e.length)return r;t=e;return(r=>{const t=r.map((r=>r[1].trim()));return t.arg=t.join(" "),t})(t)},_=()=>{n="macroValue$1";let e=R,o=null;if((o=(()=>{const e=R,o=R;for(;s()!==r;);return R-o==0?r:t.slice(e,R)})())===r)return R=e,r;return(r=>{const t=[r.trim()];return t.arg=r,t})(o)},q=()=>{for(n="_";x()!==r;);};let R=0;const C=(()=>{n="$";let t=R,e=null;if((e=$())===r)return R=t,r;return e})();return R!==t.length?(console.log("last",n),console.log("@",R),console.log(t.slice(R-10,R+10)),new Error("End of input not found")):C},e=document.createElement("style");e.setAttribute("data-name","windstorm-generated"),e.innerHTML="@layer ws.custom ws.macro ws.user;",document.head.append(e);const o=(r,...e)=>{const o=String.raw(r,...e);return a(t(o),{"&":[]},"&")},a=(r,t,e)=>{for(const o of r)l(o,t,e);return t},n=r=>r.replace(/@([a-zA-Z0-9\-_]+)/g,((r,t)=>`var(--${t})`)),l=(r,t,e)=>{if("var"===r.type)return void t[e].push(`--${r.name}: ${n(r.value)};`);if("css"===r.type)return void t[e].push(`${r.name}: ${n(r.value)};`);if("macro"===r.type){const o=i[r.name];if(void 0===o)return void console.warn(`no macro for "${r.name}"`);for(const[a,l]of Object.entries(o)){const o=a.replace("&",e);t[o]=t[o]??[],t[o].push(...l.map((t=>n(t.replace(/%(arg|\d+)/g,((t,e)=>r.value?.[e]??""))))))}return}const o=r.selector.replaceAll("&",e);t[o]=[...t[o]??[]],a(r.rules,t,o)},i={},s=r=>(t,...e)=>i[r]=o(t,...e),g=r=>Object.entries(r).reduce(((r,[t,e])=>{if(!0===t.startsWith("|")){const o=t.lastIndexOf("|"),a=[`@media (${t.slice(1,o)}) {`,`${`&${t.slice(o+1)}`} {`,...e,"}","}"].join("\n");return r.push(a),r}return r.push(`${t} {\n${e.join("\n")}\n}`),r}),[]),u=(r,t="ws.custom")=>(a,...n)=>{const l=o(a,...n),i=g(l).map((t=>t.replaceAll("&",r))),s=`@layer ${t} { ${i.join("\n")} }`;e.sheet.insertRule(s)};const d={attr:"ws-x",origin:"https://wind-cdn.axel669.net",...window.wsConfig,version:"1.0.0-beta.1",fontVersion:"2",iconVersion:"3.34.0"},c={},f=async(r,t)=>{const e=c[t],o=`ws-icon-${t}`;if(void 0!==e){if(await e.loaded,"loaded"!==e.status||null===r)return;return void r.style.setProperty("--icon-font",o)}const a=new FontFace(o,`url(${d.origin}/icon/${t}.woff?v${d.iconVersion})`);c[t]=a;try{await a.load()}catch(r){console.error(r)}document.fonts.add(a),f(r,t)},b=r=>{if(void 0===r.tagName)return;const t=r.dataset.icon??null;null!==t&&f(r,t)},p={childList(r){0!==r.addedNodes.length&&r.addedNodes.forEach((r=>{if(void 0===r.tagName)return;[r,...r.querySelectorAll("*")].forEach(b)}))},attributes(r){b(r.target)}};new MutationObserver((r=>r.forEach((r=>p[r.type](r))))).observe(document.body,{subtree:!0,attributes:!0,childList:!0,attributeFilter:["data-icon"]});const m=(...r)=>{for(const t of r)f(null,t)};s("appr")`*apperance: %arg; *-webkit-appearance: %arg;`,s("area")`*grid-area: %arg;`,s("b")`*border: %arg;`,s("b.b")`*border-bottom: %arg;`,s("b.b.c")`*border-bottom-color: %arg;`,s("b.b.s")`*border-bottom-style: %arg;`,s("b.b.w")`*border-bottom-width: %arg;`,s("b.c")`*border-color: %arg;`,s("b.l")`*border-left: %arg;`,s("b.l.c")`*border-left-color: %arg;`,s("b.l.s")`*border-left-style: %arg;`,s("b.l.w")`*border-left-width: %arg;`,s("b.r")`*border-right: %arg;`,s("b.r.c")`*border-right-color: %arg;`,s("b.r.s")`*border-right-style: %arg;`,s("b.r.w")`*border-right-width: %arg;`,s("b.s")`*border-style: %arg;`,s("b.t")`*border-top: %arg;`,s("b.t.c")`*border-top-color: %arg;`,s("b.t.s")`*border-top-style: %arg;`,s("b.t.w")`*border-top-width: %arg;`,s("b.w")`*border-width: %arg;`,s("b.x")`*border-left: %arg; *border-right: %arg;`,s("b.x.c")`*border-left-color: %arg; *border-right-color: %arg;`,s("b.x.s")`*border-left-style: %arg; *border-right-style: %arg;`,s("b.x.w")`*border-left-width: %arg; *border-right-width: %arg;`,s("b.y")`*border-top: %arg; *border-bottom: %arg;`,s("b.y.c")`*border-top-color: %arg; *border-bottom-color: %arg;`,s("b.y.s")`*border-top-style: %arg; *border-bottom-style: %arg;`,s("b.y.w")`*border-top-width: %arg; *border-bottom-width: %arg;`,s("bg")`*background: %arg;`,s("bg.att")`*background-attachment: %arg;`,s("bg.c")`*background-color: %arg;`,s("bg.img")`*background-image: %arg;`,s("bg.pos")`*background-position: %arg;`,s("bg.rep")`*background-repeat: %arg;`,s("bg.sz")`*background-size: %arg;`,s("c")`*color: %arg;`,s("col")`*grid-column: %arg;`,s("cur")`*cursor: %arg;`,s("disp")`*display: %arg;`,s("fl.basis")`*flex-basis: %arg;`,s("fl.cross")`*align-items: %arg;`,s("fl.dir")`*flex-direction: %arg;`,s("fl.flow")`*flex-flow: %arg;`,s("fl.grow")`*flex-grow: %arg;`,s("fl.main")`*justify-content: %arg;`,s("fl.shrink")`*flex-shrink: %arg;`,s("fl.size")`*flex: %arg;`,s("fl.wr")`*flex-wrap: %arg;`,s("font")`*font-family: %arg;`,s("gap")`*gap: %arg;`,s("gap.col")`*column-gap: %arg;`,s("gap.row")`*row-gap: %arg;`,s("gr.areas")`*grid-template-areas: %arg;`,s("gr.cols")`*grid-template-columns: %arg;`,s("gr.cols.a")`*grid-auto-columns: %arg;`,s("gr.flow")`*grid-auto-flow: %arg;`,s("gr.rows")`*grid-template-rows: %arg;`,s("gr.rows.a")`*grid-auto-rows: %arg;`,s("h")`*height: %arg;`,s("h.max")`*max-height: %arg;`,s("h.min")`*min-height: %arg;`,s("inset")`*top: %arg; *left: %arg; *bottom: %arg; *right: %arg;`,s("inset.x")`*left: %arg; *right: %arg;`,s("inset.y")`*top: %arg; *bottom: %arg;`,s("m")`*margin: %arg;`,s("m.b")`*margin-bottom: %arg;`,s("m.l")`*margin-left: %arg;`,s("m.r")`*margin-right: %arg;`,s("m.t")`*margin-top: %arg;`,s("m.x")`*margin-left: %arg; *margin-right: %arg;`,s("m.y")`*margin-bottom: %arg; *margin-top: %arg;`,s("o")`*opacity: %arg;`,s("outln")`*outline: %arg;`,s("over")`*overflow: %arg;`,s("over.x")`*overflow-x: %arg;`,s("over.y")`*overflow-y: %arg;`,s("p")`*padding: %arg;`,s("p.b")`*padding-bottom: %arg;`,s("p.l")`*padding-left: %arg;`,s("p.r")`*padding-right: %arg;`,s("p.t")`*padding-top: %arg;`,s("p.x")`*padding-left: %arg; *padding-right: %arg;`,s("p.y")`*padding-top: %arg; *padding-bottom: %arg;`,s("pos")`*position: %arg;`,s("pos.abs")`*position: absolute;`,s("pos.fix")`*position: fixed;`,s("pos.rel")`*position: relative;`,s("pos.stick")`*position: sticky;`,s("r")`*border-radius: %arg;`,s("r.b")`*border-bottom-left-radius: %arg; *border-bottom-right-radius: %arg;`,s("r.bl")`*border-bottom-left-radius: %arg;`,s("r.br")`*border-bottom-right-radius: %arg;`,s("r.l")`*border-top-left-radius: %arg; *border-bottom-left-radius: %arg;`,s("r.r")`*border-top-right-radius: %arg; *border-bottom-right-radius: %arg;`,s("r.t")`*border-top-left-radius: %arg; *border-top-right-radius: %arg;`,s("r.tl")`*border-top-left-radius: %arg;`,s("r.tr")`*border-top-right-radius: %arg;`,s("row")`*grid-row: %arg;`,s("sel")`*user-select: %arg;`,s("self.cross")`*align-self: %arg;`,s("self.main")`*justify-self: %arg;`,s("sh.box")`*box-shadow: %arg;`,s("sh.text")`*text-shadow: %arg;`,s("t.a")`*text-align: %arg;`,s("t.br")`*word-break: %arg;`,s("t.c")`*color: %arg;`,s("t.deco")`*text-decoration: %arg;`,s("t.lh")`*line-height: %arg;`,s("t.over")`*text-overflow: %arg;`,s("t.st")`*font-style: %arg;`,s("t.sz")`*font-size: %arg;`,s("t.tf")`*text-transform: %arg;`,s("t.var")`*font-variant: %arg;`,s("t.wrap")`*word-wrap: %arg;`,s("t.ws")`*white-space: %arg;`,s("t.wt")`*font-weight: %arg;`,s("tf")`*transform: %arg;`,s("tf.o")`*transform-origin: %arg;`,s("tf.p")`*perspective: %arg;`,s("tr")`*transition: %arg;`,s("v.a")`*vertical-align: %arg;`,s("vis")`*visibility: %arg;`,s("w")`*width: %arg;`,s("w.max")`*max-width: %arg;`,s("w.min")`*min-width: %arg;`,s("x")`*left: %arg;`,s("-x")`*right: %arg;`,s("y")`*top: %arg;`,s("-y")`*bottom: %arg;`,s("z")`*z-index: %arg;`,s("fl.cn")`fl.cross: center; fl.main: center;`,s("fl.cn.cross")`fl.cross: center;`,s("fl.cn.main")`fl.main: center;`,s("flex")`disp: flex; fl.dir: %arg;`,s("grid")`disp: grid; gr.flow: %arg;`,s("hide")`disp: none;`,s("invis")`vis: hidden;`,s("sticky")`pos: sticky; y: 0px; z: +1;`,s("adorn")`disp: flex; fl.cn; p: 4px;`,s("pad.compact")`p: 0px 4px;`,s("variant.outline")`b.w: 1px;`,s("variant.fill")`@text-color: @alt-color; @fill-color: @core-color; @active: @alt-color;`,s("variant.lined")`b.w: 0px; b.b.w: @border-size; r.b: 0px;`,s("gr.cols-fit")`*grid-template-columns: repeat(auto-fit, minmax(%arg));`,s("gr.cols-fill")`*grid-template-columns: repeat(auto-fill, minmax(%arg));`,s("text.subtitle")`t.sz: @text-size-subtitle; flex; fl.main: center; p: 0px 8px;`,s("text.title")`t.sz: @text-size-title; flex; fl.main: center; p: 4px 8px;`,s("elevate")`sh.box: 0px 2px 3px @shadow-color;`,s("#animate")`
2
2
  @modal-transition: visibility @anim-time linear;
3
3
  ! & ws-dialog {
4
4
  o: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axel669/windstorm",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -15,17 +15,17 @@ minor differences between a set of 20.
15
15
  ### CDN Link (global variable)
16
16
  ```html
17
17
  <!-- lib + components -->
18
- <script src="https://esm.sh/@axel669/windstorm@1.0.0-beta.0/es5"></script>
18
+ <script src="https://esm.sh/@axel669/windstorm@1.0.0-beta.1/es5"></script>
19
19
  <!-- lib, no components -->
20
- <script src="https://esm.sh/@axel669/windstorm@1.0.0-beta.0/nc-es5"></script>
20
+ <script src="https://esm.sh/@axel669/windstorm@1.0.0-beta.1/nc-es5"></script>
21
21
  ```
22
22
 
23
23
  ### CDN Link (module)
24
24
  ```js
25
25
  // Only scanning, no functions
26
- import "https://esm.sh/@axel669/windstorm@1.0.0-beta.0"
26
+ import "https://esm.sh/@axel669/windstorm@1.0.0-beta.1"
27
27
  // Import functions + scanning
28
- import ws from "https://esm.sh/@axel669/windstorm@1.0.0-beta.0"
28
+ import ws from "https://esm.sh/@axel669/windstorm@1.0.0-beta.1"
29
29
 
30
30
  ws.x({...stuff})
31
31
  ```
@@ -61,7 +61,7 @@ can be empty).
61
61
 
62
62
  ```html
63
63
  <body data-ws="#theme.tron; #animate;">
64
- <script src="https://esm.sh/@axel669/windstorm@1.0.0-beta.0/es5?raw"></script>
64
+ <script src="https://esm.sh/@axel669/windstorm@1.0.0-beta.1/es5?raw"></script>
65
65
  Static content here
66
66
  </body>
67
67
  ```