diff --git a/.gitignore b/.gitignore index e1038c2..1f2c7c6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ dist/ public/ test/public/ test/.next-fixture-*/ +test-results/ .tmp/ skills/artifacts/ *.generated.ts diff --git a/integration/.gitignore b/integration/.gitignore index dd2ba75..3680986 100644 --- a/integration/.gitignore +++ b/integration/.gitignore @@ -8,6 +8,7 @@ apps/*/.next/ apps/*/.nuxt/ apps/*/.output/ apps/*/.svelte-kit/ +apps/*/.vinxi/ apps/*/build/ apps/*/out-tsc/ apps/*/public/sprites/ diff --git a/integration/apps/nuxt/app/app.vue b/integration/apps/nuxt/app/app.vue deleted file mode 100644 index 46f4062..0000000 --- a/integration/apps/nuxt/app/app.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - diff --git a/integration/apps/nuxt/nuxt.config.ts b/integration/apps/nuxt/nuxt.config.ts deleted file mode 100644 index 259b4b0..0000000 --- a/integration/apps/nuxt/nuxt.config.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default defineNuxtConfig({ - compatibilityDate: '2026-07-01', - devtools: { enabled: false }, -}) diff --git a/integration/apps/nuxt/package.json b/integration/apps/nuxt/package.json deleted file mode 100644 index fabbae5..0000000 --- a/integration/apps/nuxt/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@svg-sprites-fixtures/nuxt", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "sprites": "svg-sprites --mode legacy .", - "typecheck": "nuxt typecheck", - "build": "npm run sprites && nuxt build", - "dev": "npm run sprites && nuxt dev", - "start": "node .output/server/index.mjs" - }, - "dependencies": { - "nuxt": "4.3.1", - "vue": "3.5.39" - }, - "devDependencies": { - "@gromlab/svg-sprites": "file:../../..", - "typescript": "6.0.2", - "vue-tsc": "3.3.7" - } -} diff --git a/integration/apps/nuxt/svg-sprites.config.ts b/integration/apps/nuxt/svg-sprites.config.ts deleted file mode 100644 index 24da7e0..0000000 --- a/integration/apps/nuxt/svg-sprites.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default { - output: 'public/sprites', - preview: false, - sprites: [ - { - name: 'icons', - input: '../../fixtures/icons', - format: 'symbol', - }, - ], -} diff --git a/integration/apps/solid-start-vite/.vinxi/build/client/_build/.vite/manifest.json b/integration/apps/solid-start-vite/.vinxi/build/client/_build/.vite/manifest.json deleted file mode 100644 index eca3610..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/client/_build/.vite/manifest.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "../../../dist/viewer-element.js": { - "file": "assets/viewer-element-BO6fulPI.js", - "name": "viewer-element", - "src": "../../../dist/viewer-element.js", - "isDynamicEntry": true - }, - "_index-BWUdTtCi.css": { - "file": "assets/index-BWUdTtCi.css", - "src": "_index-BWUdTtCi.css" - }, - "_index-DgFw7Fi1.js": { - "file": "assets/index-DgFw7Fi1.js", - "name": "index", - "isDynamicEntry": true, - "imports": [ - "_preload-helper-C_-y6sQU.js" - ], - "dynamicImports": [ - "../../../dist/viewer-element.js", - "src/sprite/.svg-sprite/svg-sprite.manifest.js" - ], - "css": [ - "assets/index-BWUdTtCi.css" - ], - "assets": [ - "assets/sprite-DvsqBNon.svg" - ] - }, - "_preload-helper-C_-y6sQU.js": { - "file": "assets/preload-helper-C_-y6sQU.js", - "name": "preload-helper" - }, - "src/routes/index.jsx?pick=default&pick=$css": { - "file": "assets/index-B1AR4FGy.js", - "name": "index", - "src": "src/routes/index.jsx?pick=default&pick=$css", - "isEntry": true, - "imports": [ - "_preload-helper-C_-y6sQU.js", - "_index-DgFw7Fi1.js" - ] - }, - "src/sprite/.svg-sprite/sprite.svg": { - "file": "assets/sprite-DvsqBNon.svg", - "src": "src/sprite/.svg-sprite/sprite.svg" - }, - "src/sprite/.svg-sprite/svg-sprite.manifest.js": { - "file": "assets/svg-sprite.manifest-ByXNchEI.js", - "name": "svg-sprite.manifest", - "src": "src/sprite/.svg-sprite/svg-sprite.manifest.js", - "isDynamicEntry": true, - "imports": [ - "_index-DgFw7Fi1.js", - "_preload-helper-C_-y6sQU.js" - ] - }, - "virtual:$vinxi/handler/client": { - "file": "assets/client-BDFkFOh8.js", - "name": "client", - "src": "virtual:$vinxi/handler/client", - "isEntry": true, - "imports": [ - "_preload-helper-C_-y6sQU.js" - ], - "dynamicImports": [ - "src/routes/index.jsx?pick=default&pick=$css" - ], - "css": [ - "assets/client-BVONibDl.css" - ] - } -} \ No newline at end of file diff --git a/integration/apps/solid-start-vite/.vinxi/build/client/_build/assets/client-BDFkFOh8.js b/integration/apps/solid-start-vite/.vinxi/build/client/_build/assets/client-BDFkFOh8.js deleted file mode 100644 index 9e8eb67..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/client/_build/assets/client-BDFkFOh8.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B1AR4FGy.js","assets/preload-helper-C_-y6sQU.js","assets/index-DgFw7Fi1.js","assets/index-BWUdTtCi.css"])))=>i.map(i=>d[i]); -import{r as ie,c as A,g as le,a as O,b as Le,o as J,u as Ne,d as ce,e as ue,i as Te,s as Oe,f as Ie,h as ke,j as R,k as De,m as Ue,S as de,l as je,n as fe,p as z,q as Fe,t as I,w as j,x as F,y as M,z as he,A as D,B as Me,_ as We,C as Be,E as qe,D as ze}from"./preload-helper-C_-y6sQU.js";const H="Invariant Violation",{setPrototypeOf:He=function(e,t){return e.__proto__=t,e}}=Object;class Y extends Error{framesToPop=1;name=H;constructor(t=H){super(typeof t=="number"?`${H}: ${t} (see https://github.com/apollographql/invariant-packages)`:t),He(this,Y.prototype)}}function K(e,t){if(!e)throw new Y(t)}const Ke=/^[A-Za-z]:\//;function Ve(e=""){return e&&e.replace(/\\/g,"/").replace(Ke,t=>t.toUpperCase())}const Ze=/^[/\\]{2}/,Ge=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Xe=/^[A-Za-z]:$/,Je=function(e){if(e.length===0)return".";e=Ve(e);const t=e.match(Ze),n=G(e),r=e[e.length-1]==="/";return e=Ye(e,!n),e.length===0?n?"/":r?"./":".":(r&&(e+="/"),Xe.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!G(e)?`/${e}`:e)},pe=function(...e){if(e.length===0)return".";let t;for(const n of e)n&&n.length>0&&(t===void 0?t=n:t+=`/${n}`);return t===void 0?".":Je(t.replace(/\/\/+/g,"/"))};function Ye(e,t){let n="",r=0,a=-1,o=0,i=null;for(let s=0;s<=e.length;++s){if(s2){const c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),a=s,o=0;continue}else if(n.length>0){n="",r=0,a=s,o=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${e.slice(a+1,s)}`:n=e.slice(a+1,s),r=s-a-1;a=s,o=0}else i==="."&&o!==-1?++o:o=-1}return n}const G=function(e){return Ge.test(e)};function Qe(e){return`virtual:${e}`}function et(e){return e.handler?.endsWith(".html")?G(e.handler)?e.handler:pe(e.root,e.handler):`$vinxi/handler/${e.name}`}const tt=new Proxy({},{get(e,t){return K(typeof t=="string","Bundler name should be a string"),{name:t,type:"client",handler:Qe(et({name:t})),baseURL:"/_build",chunks:new Proxy({},{get(n,r){K(typeof r=="string","Chunk expected");let a=pe("/_build",r+".mjs");return{import(){return import(a)},output:{path:a}}}}),inputs:new Proxy({},{get(n,r){K(typeof r=="string","Input must be string");let a=window.manifest[r].output;return{async import(){return import(a)},async assets(){return window.manifest[r].assets},output:{path:a}}}})}}});globalThis.MANIFEST=tt;function me(){let e=new Set;function t(a){return e.add(a),()=>e.delete(a)}let n=!1;function r(a,o){if(n)return!(n=!1);const i={to:a,options:o,defaultPrevented:!1,preventDefault:()=>i.defaultPrevented=!0};for(const s of e)s.listener({...i,from:s.location,retry:c=>{c&&(n=!0),s.navigate(a,{...o,resolve:!1})}});return!i.defaultPrevented}return{subscribe:t,confirm:r}}let X;function Q(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),X=window.history.state._depth}Q();function nt(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function rt(e,t){let n=!1;return()=>{const r=X;Q();const a=r==null?null:X-r;if(n){n=!1;return}a&&t(a)?(n=!0,window.history.go(-a)):e()}}const at=/^(?:[a-z0-9]+:)?\/\//i,ot=/^\/+|(\/)\/+$/g,ge="http://sr";function k(e,t=!1){const n=e.replace(ot,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function W(e,t,n){if(at.test(t))return;const r=k(e),a=n&&k(n);let o="";return!a||t.startsWith("/")?o=r:a.toLowerCase().indexOf(r.toLowerCase())!==0?o=r+a:o=a,(o||"/")+k(t,!o)}function st(e,t){return k(e).replace(/\/*(\*.*)?$/g,"")+k(t)}function we(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function it(e,t,n){const[r,a]=e.split("/*",2),o=r.split("/").filter(Boolean),i=o.length;return s=>{const c=s.split("/").filter(Boolean),l=c.length-i;if(l<0||l>0&&a===void 0&&!t)return null;const u={path:i?"":"/",params:{}},w=h=>n===void 0?void 0:n[h];for(let h=0;hr===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function lt(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((a,o)=>a+(o.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function ye(e){const t=new Map,n=le();return new Proxy({},{get(r,a){return t.has(a)||ie(n,()=>t.set(a,A(()=>e()[a]))),t.get(a)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,a){return a in e()}})}function ve(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const a=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)a.push(n+=t[1]),r=r.slice(t[0].length);return ve(r).reduce((o,i)=>[...o,...a.map(s=>s+i)],[])}const ct=100,ut=ce(),Re=ce();function dt(e,t=""){const{component:n,preload:r,load:a,children:o,info:i}=e,s=!o||Array.isArray(o)&&!o.length,c={key:e,component:n,preload:r||a,info:i};return be(e.path).reduce((l,u)=>{for(const w of ve(u)){const h=st(t,w);let m=s?h:h.split("/*",1)[0];m=m.split("/").map(b=>b.startsWith(":")||b.startsWith("*")?b:encodeURIComponent(b)).join("/"),l.push({...c,originalPath:u,pattern:m,matcher:it(m,!s,e.matchFilters)})}return l},[])}function ft(e,t=0){return{routes:e,score:lt(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let a=e.length-1;a>=0;a--){const o=e[a],i=o.matcher(n);if(!i)return null;r.unshift({...i,route:o})}return r}}}function be(e){return Array.isArray(e)?e:[e]}function Ee(e,t="",n=[],r=[]){const a=be(e);for(let o=0,i=a.length;oi.score-o.score)}function Z(e,t){for(let n=0,r=e.length;n{const w=e();try{return new URL(w,r)}catch{return console.error(`Invalid path ${w}`),u}},r,{equals:(u,w)=>u.href===w.href}),o=A(()=>a().pathname),i=A(()=>a().search,!0),s=A(()=>a().hash),c=()=>"",l=J(i,()=>we(a()));return{get pathname(){return o()},get search(){return i()},get hash(){return s()},get state(){return t()},get key(){return c()},query:n?n(l):ye(l)}}let S;function pt(){return S}function mt(e,t,n,r={}){const{signal:[a,o],utils:i={}}=e,s=i.parsePath||(p=>p),c=i.renderPath||(p=>p),l=i.beforeLeave||me(),u=W("",r.base||"");if(u===void 0)throw new Error(`${u} is not a valid base path`);u&&!a().value&&o({value:u,replace:!0,scroll:!1});const[w,h]=O(!1);let m;const b=(p,g)=>{g.value===d()&&g.state===v()||(m===void 0&&h(!0),S=p,m=g,Oe(()=>{m===g&&(f(m.value),y(m.state),ke(),C[1](E=>E.filter(x=>x.pending)))}).finally(()=>{m===g&&Ie(()=>{S=void 0,p==="navigate"&&xe(m),h(!1),m=void 0})}))},[d,f]=O(a().value),[v,y]=O(a().state),$=ht(d,v,i.queryWrapper),P=[],C=O([]),N=A(()=>typeof r.transformUrl=="function"?Z(t(),r.transformUrl($.pathname)):Z(t(),$.pathname)),ee=()=>{const p=N(),g={};for(let E=0;Eu,outlet:()=>null,resolvePath(p){return W(u,p)}};return Le(J(a,p=>b("native",p),{defer:!0})),{base:te,location:$,params:$e,isRouting:w,renderPath:c,parsePath:s,navigatorFactory:Se,matches:N,beforeLeave:l,preloadRoute:_e,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:C};function Ce(p,g,E){ue(()=>{if(typeof g=="number"){g&&(i.go?i.go(g):console.warn("Router integration does not support relative routing"));return}const x=!g||g[0]==="?",{replace:B,resolve:_,scroll:q,state:T}={replace:!1,resolve:!x,scroll:!0,...E},U=_?p.resolvePath(g):W(x&&$.pathname||"",g);if(U===void 0)throw new Error(`Path '${g}' is not a routable path`);if(P.length>=ct)throw new Error("Too many redirects");const ne=d();(U!==ne||T!==v())&&(Te||l.confirm(U,E)&&(P.push({value:ne,replace:B,scroll:q,state:v()}),b("navigate",{value:U,state:T})))})}function Se(p){return p=p||Ne(Re)||te,(g,E)=>Ce(p,g,E)}function xe(p){const g=P[0];g&&(o({...p,replace:g.replace,scroll:g.scroll}),P.length=0)}function _e(p,g){const E=Z(t(),p.pathname),x=S;S="preload";for(let B in E){const{route:_,params:q}=E[B];_.component&&_.component.preload&&_.component.preload();const{preload:T}=_;g&&T&&ie(n(),()=>T({params:q,location:{pathname:p.pathname,search:p.search,hash:p.hash,query:we(p),state:null,key:""},intent:"preload"}))}S=x}}function gt(e,t,n,r){const{base:a,location:o,params:i}=e,{pattern:s,component:c,preload:l}=r().route,u=A(()=>r().path);c&&c.preload&&c.preload();const w=l?l({params:i,location:o,intent:S||"initial"}):void 0;return{parent:t,pattern:s,path:u,outlet:()=>c?R(c,{params:i,location:o,data:w,get children(){return n()}}):n(),resolvePath(m){return W(a.path(),m,u())}}}const wt=e=>t=>{const{base:n}=t,r=De(()=>t.children),a=A(()=>Ee(r(),t.base||""));let o;const i=mt(e,a,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(i),R(ut.Provider,{value:i,get children(){return R(yt,{routerState:i,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[Ue(()=>(o=le())&&null),R(vt,{routerState:i,get branches(){return a()}})]}})}})};function yt(e){const t=e.routerState.location,n=e.routerState.params,r=A(()=>e.preload&&ue(()=>{e.preload({params:n,location:t,intent:pt()||"initial"})}));return R(de,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:a=>R(a,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function vt(e){const t=[];let n;const r=A(J(e.routerState.matches,(a,o,i)=>{let s=o&&a.length===o.length;const c=[];for(let l=0,u=a.length;l{t[l]=m,c[l]=gt(e.routerState,c[l-1]||e.routerState.base,re(()=>r()[l+1]),()=>{const b=e.routerState.matches();return b[l]??b[0]})}))}return t.splice(a.length).forEach(l=>l()),i&&s?i:(n=c[0],c)}));return re(()=>r()&&n)()}const re=e=>()=>R(de,{get when(){return e()},keyed:!0,children:t=>R(Re.Provider,{value:t,get children(){return t.outlet()}})});function Rt([e,t],n,r){return[e,r?a=>t(r(a)):t]}function bt(e){let t=!1;const n=a=>typeof a=="string"?{value:a}:a,r=Rt(O(n(e.get()),{equals:(a,o)=>a.value===o.value&&a.state===o.state}),void 0,a=>(!t&&e.set(a),z.registry&&!z.done&&(z.done=!0),a));return e.init&&fe(e.init((a=e.get())=>{t=!0,r[1](n(a)),t=!1})),wt({signal:r,create:e.create,utils:e.utils})}function Et(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Pt(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const At=new Map;function $t(e=!0,t=!1,n="/_server",r){return a=>{const o=a.base.path(),i=a.navigatorFactory(a.base);let s,c;function l(d){return d.namespaceURI==="http://www.w3.org/2000/svg"}function u(d){if(d.defaultPrevented||d.button!==0||d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)return;const f=d.composedPath().find(N=>N instanceof Node&&N.nodeName.toUpperCase()==="A");if(!f||t&&!f.hasAttribute("link"))return;const v=l(f),y=v?f.href.baseVal:f.href;if((v?f.target.baseVal:f.target)||!y&&!f.hasAttribute("state"))return;const P=(f.getAttribute("rel")||"").split(/\s+/);if(f.hasAttribute("download")||P&&P.includes("external"))return;const C=v?new URL(y,document.baseURI):new URL(y);if(!(C.origin!==window.location.origin||o&&C.pathname&&!C.pathname.toLowerCase().startsWith(o.toLowerCase())))return[f,C]}function w(d){const f=u(d);if(!f)return;const[v,y]=f,$=a.parsePath(y.pathname+y.search+y.hash),P=v.getAttribute("state");d.preventDefault(),i($,{resolve:!1,replace:v.hasAttribute("replace"),scroll:!v.hasAttribute("noscroll"),state:P?JSON.parse(P):void 0})}function h(d){const f=u(d);if(!f)return;const[v,y]=f;r&&(y.pathname=r(y.pathname)),a.preloadRoute(y,v.getAttribute("preload")!=="false")}function m(d){clearTimeout(s);const f=u(d);if(!f)return c=null;const[v,y]=f;c!==v&&(r&&(y.pathname=r(y.pathname)),s=setTimeout(()=>{a.preloadRoute(y,v.getAttribute("preload")!=="false"),c=v},20))}function b(d){if(d.defaultPrevented)return;let f=d.submitter&&d.submitter.hasAttribute("formaction")?d.submitter.getAttribute("formaction"):d.target.getAttribute("action");if(!f)return;if(!f.startsWith("https://action/")){const y=new URL(f,ge);if(f=a.parsePath(y.pathname+y.search),!f.startsWith(n))return}if(d.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const v=At.get(f);if(v){d.preventDefault();const y=new FormData(d.target,d.submitter);v.call({r:a,f:d.target},d.target.enctype==="multipart/form-data"?y:new URLSearchParams(y))}}Fe(["click","submit"]),document.addEventListener("click",w),e&&(document.addEventListener("mousemove",m,{passive:!0}),document.addEventListener("focusin",h,{passive:!0}),document.addEventListener("touchstart",h,{passive:!0})),document.addEventListener("submit",b),fe(()=>{document.removeEventListener("click",w),e&&(document.removeEventListener("mousemove",m),document.removeEventListener("focusin",h),document.removeEventListener("touchstart",h)),document.removeEventListener("submit",b)})}}function Ct(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,a=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:a}},n=me();return bt({get:t,set({value:r,replace:a,scroll:o,state:i}){a?window.history.replaceState(nt(i),"",r):window.history.pushState(i,"",r),Pt(decodeURIComponent(window.location.hash.slice(1)),o),Q()},init:r=>Et(window,"popstate",rt(r,a=>{if(a)return!n.confirm(a);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:$t(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}function St(e){e.forEach(t=>{if(!t.attrs.href)return;let n=document.head.querySelector(`link[href="${t.attrs.href}"]`);n||(n=document.createElement("link"),n.setAttribute("rel","preload"),n.setAttribute("as","style"),n.setAttribute("href",t.attrs.href),document.head.appendChild(n))})}var xt=D(" \ No newline at end of file diff --git a/integration/apps/solid-start-vite/.vinxi/build/client/_build/assets/svg-sprite.manifest-ByXNchEI.js b/integration/apps/solid-start-vite/.vinxi/build/client/_build/assets/svg-sprite.manifest-ByXNchEI.js deleted file mode 100644 index 45c8d85..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/client/_build/assets/svg-sprite.manifest-ByXNchEI.js +++ /dev/null @@ -1 +0,0 @@ -import{s as o}from"./index-DgFw7Fi1.js";import"./preload-helper-C_-y6sQU.js";const s={schemaVersion:1,generator:"@gromlab/svg-sprites",name:"icons",usage:{framework:"solid-start",componentName:"IconsIcon",ssr:!0},mode:"solid-start@vite",target:"vite",format:"stack",iconCount:1,spriteUrl:o,icons:[{name:"check",id:"check",viewBox:"0 0 24 24",colors:[{variable:"--icon-color-1",fallback:"currentColor"}]}]};export{s as default,s as spriteManifest}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/client/_build/assets/viewer-element-BO6fulPI.js b/integration/apps/solid-start-vite/.vinxi/build/client/_build/assets/viewer-element-BO6fulPI.js deleted file mode 100644 index a96cb71..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/client/_build/assets/viewer-element-BO6fulPI.js +++ /dev/null @@ -1,602 +0,0 @@ -var Rt=Object.defineProperty,Lt=Object.getOwnPropertyNames,m=(e,t,r)=>function(){if(r)throw r[0];try{return e&&(t=(0,e[Lt(e)[0]])(e=0)),t}catch(o){throw r=[o],o}},it=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},E,u,te=m({"node_modules/vanilla-colorful/lib/utils/math.js"(){E=(e,t=0,r=1)=>e>r?r:eMath.round(r*e)/r}}),ot,Y,st,Pe,Z,He,S,Ue,Ne,re=m({"node_modules/vanilla-colorful/lib/utils/convert.js"(){te(),ot=e=>Ne(Y(e)),Y=e=>(e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?u(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?u(parseInt(e.substring(6,8),16)/255,2):1}),st=e=>Ue(He(e)),Pe=({h:e,s:t,v:r,a:i})=>{const o=(200-t)*r/100;return{h:u(e),s:u(o>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0),l:u(o/2),a:u(i,2)}},Z=e=>{const{h:t,s:r,l:i}=Pe(e);return`hsl(${t}, ${r}%, ${i}%)`},He=({h:e,s:t,v:r,a:i})=>{e=e/360*6,t=t/100,r=r/100;const o=Math.floor(e),s=r*(1-t),a=r*(1-(e-o)*t),n=r*(1-(1-e+o)*t),l=o%6;return{r:u([r,a,s,s,n,r][l]*255),g:u([n,r,r,a,s,s][l]*255),b:u([s,s,n,r,r,a][l]*255),a:u(i,2)}},S=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},Ue=({r:e,g:t,b:r,a:i})=>{const o=i<1?S(u(i*255)):"";return"#"+S(e)+S(t)+S(r)+o},Ne=({r:e,g:t,b:r,a:i})=>{const o=Math.max(e,t,r),s=o-Math.min(e,t,r),a=s?o===e?(t-r)/s:o===t?2+(r-e)/s:4+(e-t)/s:0;return{h:u(60*(a<0?a+6:a)),s:u(o?s/o*100:0),v:u(o/255*100),a:i}}}}),$e,at,nt=m({"node_modules/vanilla-colorful/lib/utils/compare.js"(){re(),$e=(e,t)=>{if(e===t)return!0;for(const r in e)if(e[r]!==t[r])return!1;return!0},at=(e,t)=>e.toLowerCase()===t.toLowerCase()?!0:$e(Y(e),Y(t))}}),ae,ie,X,Ae=m({"node_modules/vanilla-colorful/lib/utils/dom.js"(){ae={},ie=e=>{let t=ae[e];return t||(t=document.createElement("template"),t.innerHTML=e,ae[e]=t),t},X=(e,t,r)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}}}),w,z,De,ne,Re,Ee,lt=m({"node_modules/vanilla-colorful/lib/components/slider.js"(){Ae(),te(),w=!1,z=e=>"touches"in e,De=e=>w&&!z(e)?!1:(w||(w=z(e)),!0),ne=(e,t)=>{const r=z(t)?t.touches[0]:t,i=e.el.getBoundingClientRect();X(e.el,"move",e.getMove({x:E((r.pageX-(i.left+window.pageXOffset))/i.width),y:E((r.pageY-(i.top+window.pageYOffset))/i.height)}))},Re=(e,t)=>{const r=t.keyCode;r>40||e.xy&&r<37||r<33||(t.preventDefault(),X(e.el,"move",e.getMove({x:r===39?.01:r===37?-.01:r===34?.05:r===33?-.05:r===35?1:r===36?-1:0,y:r===40?.01:r===38?-.01:0},!0)))},Ee=class{constructor(e,t,r,i){const o=ie(`
`);e.appendChild(o.content.cloneNode(!0));const s=e.querySelector(`[part=${t}]`);s.addEventListener("mousedown",this),s.addEventListener("touchstart",this),s.addEventListener("keydown",this),this.el=s,this.xy=i,this.nodes=[s.firstChild,s]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(w?"touchmove":"mousemove",this),t(w?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!De(e)||!w&&e.button!=0)return;this.el.focus(),ne(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),ne(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":Re(this,e);break}}style(e){e.forEach((t,r)=>{for(const i in t)this.nodes[r].style.setProperty(i,t[i])})}}}}),ct,jt=m({"node_modules/vanilla-colorful/lib/components/hue.js"(){lt(),re(),te(),ct=class extends Ee{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:`${e/360*100}%`,color:Z({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${u(e)}`)}getMove(e,t){return{h:t?E(this.h+e.x*360,0,360):360*e.x}}}}}),dt,zt=m({"node_modules/vanilla-colorful/lib/components/saturation.js"(){lt(),re(),te(),dt=class extends Ee{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:`${100-e.v}%`,left:`${e.s}%`,color:Z(e)},{"background-color":Z({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${u(e.s)}%, Brightness ${u(e.v)}%`)}getMove(e,t){return{s:t?E(this.hsva.s+e.x*100,0,100):e.x*100,v:t?E(this.hsva.v-e.y*100,0,100):Math.round(100-e.y*100)}}}}}),ht,Bt=m({"node_modules/vanilla-colorful/lib/styles/color-picker.js"(){ht=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}'}}),pt,It=m({"node_modules/vanilla-colorful/lib/styles/hue.js"(){pt="[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}"}}),ut,Vt=m({"node_modules/vanilla-colorful/lib/styles/saturation.js"(){ut="[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"}}),T,B,le,I,ce,de,he,gt,qt=m({"node_modules/vanilla-colorful/lib/components/color-picker.js"(){nt(),Ae(),jt(),zt(),Bt(),It(),Vt(),T=Symbol("same"),B=Symbol("color"),le=Symbol("hsva"),I=Symbol("update"),ce=Symbol("parts"),de=Symbol("css"),he=Symbol("sliders"),gt=class extends HTMLElement{static get observedAttributes(){return["color"]}get[de](){return[ht,pt,ut]}get[he](){return[dt,ct]}get color(){return this[B]}set color(e){if(!this[T](e)){const t=this.colorModel.toHsva(e);this[I](t),this[B]=e}}constructor(){super();const e=ie(``),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[ce]=this[he].map(r=>new r(t))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,r){const i=this.colorModel.fromAttr(r);this[T](i)||(this.color=i)}handleEvent(e){const t=this[le],r={...t,...e.detail};this[I](r);let i;!$e(r,t)&&!this[T](i=this.colorModel.fromHsva(r))&&(this[B]=i,X(this,"color-changed",{value:i}))}[T](e){return this.color&&this.colorModel.equal(e,this.color)}[I](e){this[le]=e,this[ce].forEach(t=>t.update(e))}}}}),mt={};it(mt,{HexBase:()=>vt});var Le,vt,Ft=m({"node_modules/vanilla-colorful/lib/entrypoints/hex.js"(){qt(),re(),nt(),Le={defaultColor:"#000",toHsva:ot,fromHsva:({h:e,s:t,v:r})=>st({h:e,s:t,v:r,a:1}),equal:at,fromAttr:e=>e},vt=class extends gt{get colorModel(){return Le}}}}),je,G,Jt=m({"node_modules/vanilla-colorful/lib/utils/validate.js"(){je=/^#?([0-9A-F]{3,8})$/i,G=(e,t)=>{const r=je.exec(e),i=r?r[1].length:0;return i===3||i===6||!!t&&i===4||!!t&&i===8}}}),_t={};it(_t,{HexInputBase:()=>ft});var ze,pe,ue,M,ge,V,q,me,C,ft,Wt=m({"node_modules/vanilla-colorful/lib/entrypoints/hex-input.js"(){Jt(),Ae(),ze=ie(''),pe=(e,t)=>e.replace(/([^0-9A-F]+)/gi,"").substring(0,t?8:6),ue=Symbol("alpha"),M=Symbol("color"),ge=Symbol("saved"),V=Symbol("input"),q=Symbol("init"),me=Symbol("prefix"),C=Symbol("update"),ft=class extends HTMLElement{static get observedAttributes(){return["alpha","color","prefixed"]}get color(){return this[M]}set color(e){this[M]=e,this[C](e)}get alpha(){return this[ue]}set alpha(e){this[ue]=e,this.toggleAttribute("alpha",e);const t=this.color;t&&!G(t,e)&&(this.color=t.startsWith("#")?t.substring(0,t.length===5?4:7):t.substring(0,t.length===4?3:6))}get prefixed(){return this[me]}set prefixed(e){this[me]=e,this.toggleAttribute("prefixed",e),this[C](this.color)}constructor(){super();const e=this.attachShadow({mode:"open"});e.appendChild(ze.content.cloneNode(!0)),e.firstElementChild.addEventListener("slotchange",()=>this[q](e))}connectedCallback(){if(this[q](this.shadowRoot),this.hasOwnProperty("alpha")){const e=this.alpha;delete this.alpha,this.alpha=e}else this.alpha=this.hasAttribute("alpha");if(this.hasOwnProperty("prefixed")){const e=this.prefixed;delete this.prefixed,this.prefixed=e}else this.prefixed=this.hasAttribute("prefixed");if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color==null?this.color=this.getAttribute("color")||"":this[M]&&this[C](this[M])}handleEvent(e){const t=e.target,{value:r}=t;switch(e.type){case"input":const i=pe(r,this.alpha);this[ge]=this.color,(G(i,this.alpha)||r==="")&&(this.color=i,this.dispatchEvent(new CustomEvent("color-changed",{bubbles:!0,detail:{value:i?"#"+i:""}})));break;case"blur":r&&!G(r,this.alpha)&&(this.color=this[ge])}}attributeChangedCallback(e,t,r){e==="color"&&this.color!==r&&(this.color=r);const i=r!=null;e==="alpha"&&this.alpha!==i&&(this.alpha=i),e==="prefixed"&&this.prefixed!==i&&(this.prefixed=i)}[q](e){let t=this.querySelector("input");if(!t){let r;for(;r=this.firstChild;)r.remove();t=e.querySelector("input")}t.addEventListener("input",this),t.addEventListener("blur",this),this[V]=t,this[C](this.color)}[C](e){this[V]&&(this[V].value=e==null||e==""?"":(this.prefixed?"#":"")+pe(e,this.alpha))}}}}),K=globalThis,ke=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bt=Symbol(),Be=new WeakMap,Gt=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==bt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(ke&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Be.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Be.set(t,e))}return e}toString(){return this.cssText}},wt=e=>new Gt(typeof e=="string"?e:e+"",void 0,bt),Kt=(e,t)=>{if(ke)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of t){const i=document.createElement("style"),o=K.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=r.cssText,e.appendChild(i)}},Ie=ke?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const i of t.cssRules)r+=i.cssText;return wt(r)})(e):e,{is:Yt,defineProperty:Zt,getOwnPropertyDescriptor:Xt,getOwnPropertyNames:Qt,getOwnPropertySymbols:er,getPrototypeOf:tr}=Object,oe=globalThis,Ve=oe.trustedTypes,rr=Ve?Ve.emptyScript:"",ir=oe.reactiveElementPolyfillSupport,H=(e,t)=>e,xe={toAttribute(e,t){switch(t){case Boolean:e=e?rr:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},$t=(e,t)=>!Yt(e,t),qe={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:$t};Symbol.metadata??=Symbol("metadata"),oe.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=qe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&Zt(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){const{get:i,set:o}=Xt(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:i,set(s){const a=i?.call(this);o?.call(this,s),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qe}static _$Ei(){if(this.hasOwnProperty(H("elementProperties")))return;const e=tr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(H("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(H("properties"))){const t=this.properties,r=[...Qt(t),...er(t)];for(const i of r)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,i]of t)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)t.unshift(Ie(i))}else e!==void 0&&t.push(Ie(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Kt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const o=(r.converter?.toAttribute!==void 0?r.converter:xe).toAttribute(t,r.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:xe;this._$Em=i;const a=s.fromAttribute(t,o.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(e,t,r,i=!1,o){if(e!==void 0){const s=this.constructor;if(i===!1&&(o=this[e]),r??=s.getPropertyOptions(e),!((r.hasChanged??$t)(o,t)||r.useDefault&&r.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:i,wrapped:o},s){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),o!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,o]of r){const{wrapped:s}=o,a=this[i];s!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,o,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[H("elementProperties")]=new Map,A[H("finalized")]=new Map,ir?.({ReactiveElement:A}),(oe.reactiveElementVersions??=[]).push("2.1.2");var Se=globalThis,Fe=e=>e,Q=Se.trustedTypes,Je=Q?Q.createPolicy("lit-html",{createHTML:e=>e}):void 0,xt="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,yt="?"+f,or=`<${yt}>`,y=document,N=()=>y.createComment(""),D=e=>e===null||typeof e!="object"&&typeof e!="function",Te=Array.isArray,sr=e=>Te(e)||typeof e?.[Symbol.iterator]=="function",ve=`[ -\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,We=/-->/g,Ge=/>/g,$=RegExp(`>|${ve}(?:([^\\s"'>=/]+)(${ve}*=${ve}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),Ke=/'/g,Ye=/"/g,Ct=/^(?:script|style|textarea|title)$/i,ar=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),p=ar(1),b=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Ze=new WeakMap,x=y.createTreeWalker(y,129);function At(e,t){if(!Te(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Je!==void 0?Je.createHTML(t):t}var nr=(e,t)=>{const r=e.length-1,i=[];let o,s=t===2?"":t===3?"":"",a=O;for(let n=0;n"?(a=o??O,h=-1):d[1]===void 0?h=-2:(h=a.lastIndex-d[2].length,g=d[1],a=d[3]===void 0?$:d[3]==='"'?Ye:Ke):a===Ye||a===Ke?a=$:a===We||a===Ge?a=O:(a=$,o=void 0);const _=a===$&&e[n+1].startsWith("/>")?" ":"";s+=a===O?l+or:h>=0?(i.push(g),l.slice(0,h)+xt+l.slice(h)+f+_):l+f+(h===-2?n:_)}return[At(e,s+(e[r]||"")+(t===2?"":t===3?"":"")),i]},ye=class Et{constructor({strings:t,_$litType$:r},i){let o;this.parts=[];let s=0,a=0;const n=t.length-1,l=this.parts,[g,d]=nr(t,r);if(this.el=Et.createElement(g,i),x.currentNode=this.el.content,r===2||r===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=x.nextNode())!==null&&l.length0){o.textContent=Q?Q.emptyScript:"";for(let _=0;_2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(e,t=this,r,i){const o=this.strings;let s=!1;if(o===void 0)e=k(this,e,t,0),s=!D(e)||e!==this._$AH&&e!==b,s&&(this._$AH=e);else{const a=e;let n,l;for(e=o[0],n=0;n{const i=r?.renderBefore??t;let o=i._$litPart$;if(o===void 0){const s=r?.renderBefore??null;i._$litPart$=o=new Me(t.insertBefore(N(),s),s,void 0,r??{})}return o._$AI(e),o},Oe=globalThis,U=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=gr(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return b}};U._$litElement$=!0,U.finalized=!0,Oe.litElementHydrateSupport?.({LitElement:U});var mr=Oe.litElementPolyfillSupport;mr?.({LitElement:U});(Oe.litElementVersions??=[]).push("4.2.2");var F=e=>e??c,St={ATTRIBUTE:1,CHILD:2},Tt=e=>(...t)=>({_$litDirective$:e,values:t}),Mt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},Ot="important",vr=" !"+Ot,_e=Tt(class extends Mt{constructor(e){if(super(e),e.type!==St.ATTRIBUTE||e.name!=="style"||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const i=e[r];return i==null?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){const{style:r}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?r.removeProperty(i):r[i]=null);for(const i in t){const o=t[i];if(o!=null){this.ft.add(i);const s=typeof o=="string"&&o.endsWith(vr);i.includes("-")||s?r.setProperty(i,s?o.slice(0,-11):o,s?Ot:""):r[i]=o}}return b}}),Ce=class extends Mt{constructor(e){if(super(e),this.it=c,e.type!==St.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===c||e==null)return this._t=void 0,this.it=e;if(e===b)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Ce.directiveName="unsafeHTML",Ce.resultType=1;var _r=Tt(Ce),fr=[{id:"svg",label:"SVG"},{id:"img",label:"IMG"},{id:"css",label:"CSS"}],br={react:"React",vue:"Vue",svelte:"Svelte",angular:"Angular",astro:"Astro",solid:"Solid","solid-start":"SolidStart",preact:"Preact",qwik:"Qwik",lit:"Lit",alpine:"Alpine"};function Pt(e){return e.usage?e.usage:e.componentName?{framework:"react",componentName:e.componentName}:null}function fe(e){const t=Pt(e),i=[...t?[{id:t.framework,label:br[t.framework]}]:[],...fr];return e.format==="stack"?i:i.filter(o=>o.id!=="img"&&o.id!=="css")}function wr(e){if(!e)return null;const t=e.trim().split(/[\s,]+/).map(Number);return t.length===4&&t.every(Number.isFinite)?`${t[2]} × ${t[3]}`:null}function R(e,t="#1a1a1a"){const r=e.trim().toLowerCase();if(r==="currentcolor")return R(t);const i=r.match(/^#([\da-f])([\da-f])([\da-f])(?:[\da-f])?$/i);if(i)return`#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}`;const o=r.match(/^#([\da-f]{6})(?:[\da-f]{2})?$/i);if(o)return`#${o[1]}`;const s=r.match(/^rgba?\(\s*(\d+)\s*[, ]\s*(\d+)\s*[, ]\s*(\d+)/);return s?`#${s.slice(1,4).map(n=>Math.min(255,Number(n)).toString(16).padStart(2,"0")).join("")}`:{black:"#000000",blue:"#0000ff",cyan:"#00ffff",gray:"#808080",green:"#008000",grey:"#808080",magenta:"#ff00ff",orange:"#ffa500",pink:"#ffc0cb",purple:"#800080",red:"#ff0000",white:"#ffffff",yellow:"#ffff00"}[r]??R(t===e?"#1a1a1a":t)}function $r(e){return Object.entries(e).map(([t,r])=>` ${JSON.stringify(t)}: ${JSON.stringify(r)},`)}function P(e){const t={"&":"&",'"':""","<":"<",">":">"};return e.replace(/[&"<>]/g,r=>t[r])}function xr(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function yr(e){const{manifest:t,icon:r,tab:i,colorOverrides:o,cssColor:s}=e,a=`${t.spriteUrl}#${r.id}`,n=$r(o);if(!["svg","img","css"].includes(i)){const d=Pt(t);if(!d)throw new Error(`The ${i} code tab requires component metadata.`);if(d.framework==="alpine")return{code:``,language:"html"};if(d.framework==="lit")return{code:`<${d.tagName} icon=${JSON.stringify(r.name)}>`,language:"html"};if(d.framework==="angular")return{code:`<${d.selector} icon=${JSON.stringify(r.name)}>`,language:"html"};if(d.framework==="vue"){const h=Object.entries(o).map(([v,_])=>`${JSON.stringify(v)}: ${JSON.stringify(_)}`).join(", ");return{code:`<${d.componentName} icon=${JSON.stringify(r.name)}${h?` :style="{ ${P(h)} }"`:""} />`,language:"html"}}return n.length===0?{code:`<${d.componentName} icon=${JSON.stringify(r.name)} />`,language:"tsx"}:{code:[`<${d.componentName}`,` icon=${JSON.stringify(r.name)}`," style={{",...n," }}","/>"].join(` -`),language:"tsx"}}if(i==="svg"){const d=Object.entries(o).map(([h,v])=>`${h}: ${v}`).join("; ");return{code:` - -`,language:"html"}}if(i==="img")return{code:`${P(r.name)}`,language:"html"};const l=`icon-${r.name.replace(/[^a-zA-Z0-9_-]+/g,"-")||"sprite"}`,g=xr(a);return{code:[`.${l} {`," width: 24px;"," height: 24px;",` mask: url('${g}') no-repeat center / contain;`,` -webkit-mask: url('${g}') no-repeat center / contain;`,` background-color: ${s};`,"}"].join(` -`),language:"css"}}var Cr=/[&<>"]/g,Ar={"&":"&","<":"<",">":">",'"':"""},Er=[[//g,"comment"],[/<\/?[\w.-]+/g,"tag"],[/[\w-]+(?=\s*=)/g,"attr"],[/"[^"]*"|'[^']*'/g,"string"]],kr=[[/\/\*[\s\S]*?\*\//g,"comment"],[/\.[\w-]+/g,"selector"],[/[\w-]+(?=\s*:)/g,"property"],[/'[^']*'|"[^"]*"/g,"string"],[/#[\da-fA-F]{3,8}\b/g,"color"],[/\d+(?:\.\d+)?(?:px|em|rem|%)?/g,"number"]];function Sr(e,t){const r=t==="css"?kr:Er,i=[];let o=0;for(;o{const n=a.replace(Cr,l=>Ar[l]);return s?`${n}`:n}).join("")}var J=new WeakMap;function L(e){return e!==null&&typeof e=="object"}function Ht(e){return L(e)?typeof e.name=="string"&&typeof e.id=="string"&&(e.viewBox===null||typeof e.viewBox=="string")&&Array.isArray(e.colors):!1}function Ut(e){return L(e)?e.schemaVersion===1&&e.generator==="@gromlab/svg-sprites"&&typeof e.name=="string"&&typeof e.target=="string"&&(e.format==="stack"||e.format==="symbol")&&typeof e.iconCount=="number"&&typeof e.spriteUrl=="string"&&Array.isArray(e.icons)&&e.icons.every(Ht):!1}function Nt(e){return L(e)&&e.schemaVersion===1&&e.generator==="@gromlab/svg-sprites"&&typeof e.name=="string"&&typeof e.target=="string"&&(e.format==="stack"||e.format==="symbol")&&typeof e.iconCount=="number"&&Array.isArray(e.icons)&&e.icons.every(Ht)}function Tr(e){return!L(e)||Ut(e)||Nt(e)?e:e.default??e.spriteManifest??e}function ee(e,t){const r=Tr(e);if(Ut(r))return r;if(t&&Nt(r))return{...r,spriteUrl:t};throw new Error("The loaded source does not contain a valid SVG sprite manifest.")}function Xe(e){return Array.isArray(e)?e:Object.values(e)}function Dt(e){if(!L(e))return!1;const t=e;return typeof t.manifestUrl=="string"&&typeof t.spriteUrl=="string"}function Qe(e,t){return e.namet.name?1:0}async function Mr(e){const t=await fetch(e.manifestUrl);if(!t.ok)throw new Error(`Cannot load SVG sprite manifest: ${t.status} ${t.statusText}`);return ee(await t.json(),e.spriteUrl)}async function Or(e){if(Dt(e))return Mr(e);if(typeof e!="function")return ee(e);const t=J.get(e);if(t)return t;const r=Promise.resolve().then(e).then(i=>ee(i));return J.set(e,r),r.catch(()=>{J.get(e)===r&&J.delete(e)}),r}var Pr=` -:host { display: block; } -.gromlab-sprite-viewer { - --sv-bg: #f0f0f3; - --sv-text: #1a1a1a; - --sv-card: #ffffff; - --sv-card-hover: #eaeaed; - --sv-border: #d8d8d8; - --sv-accent: #3b82f6; - --sv-muted: #777777; - --sv-code: #f5f5f5; - --sv-checker-a: #e9e9e9; - --sv-checker-b: #ffffff; - --sv-danger: #b42332; - box-sizing: border-box; - min-height: 320px; - padding: 24px; - color: var(--sv-text); - color-scheme: light; - background: var(--sv-bg); - border-radius: 12px; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -} -.gromlab-sprite-viewer[data-theme="dark"] { - --sv-bg: #1a1a1a; - --sv-text: #e5e5e5; - --sv-card: #2a2a2a; - --sv-card-hover: #333333; - --sv-border: #404040; - --sv-muted: #a3a3a3; - --sv-code: #242424; - --sv-checker-a: #333333; - --sv-checker-b: #2a2a2a; - --sv-danger: #ff9ba6; - color-scheme: dark; -} -@media (prefers-color-scheme: dark) { - .gromlab-sprite-viewer:not([data-theme]) { - --sv-bg: #1a1a1a; - --sv-text: #e5e5e5; - --sv-card: #2a2a2a; - --sv-card-hover: #333333; - --sv-border: #404040; - --sv-muted: #a3a3a3; - --sv-code: #242424; - --sv-checker-a: #333333; - --sv-checker-b: #2a2a2a; - --sv-danger: #ff9ba6; - color-scheme: dark; - } -} -.gromlab-sprite-viewer *, -.gromlab-sprite-viewer *::before, -.gromlab-sprite-viewer *::after { box-sizing: border-box; } -.gromlab-sprite-viewer button, -.gromlab-sprite-viewer input { font: inherit; } -.gromlab-sprite-viewer__header { - display: flex; - align-items: center; - gap: 16px; - flex-wrap: wrap; - margin-bottom: 24px; -} -.gromlab-sprite-viewer__title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; } -.gromlab-sprite-viewer__summary { color: var(--sv-muted); font-size: 13px; } -.gromlab-sprite-viewer__toolbar { display: flex; align-items: center; gap: 12px; margin-left: auto; } -.gromlab-sprite-viewer__search { - width: 220px; - height: 38px; - padding: 0 12px; - color: var(--sv-text); - background: var(--sv-card); - border: 1px solid var(--sv-border); - border-radius: 8px; - outline: none; - transition: border-color .15s, box-shadow .15s; -} -.gromlab-sprite-viewer__search:focus { border-color: var(--sv-accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); } -.gromlab-sprite-viewer__search::placeholder { color: var(--sv-muted); } -.gromlab-sprite-viewer__theme { - display: grid; - place-items: center; - width: 38px; - height: 38px; - padding: 0; - color: var(--sv-text); - background: var(--sv-card); - border: 1px solid var(--sv-border); - border-radius: 8px; - cursor: pointer; - transition: background .15s, border-color .15s; -} -.gromlab-sprite-viewer__theme:hover { background: var(--sv-card-hover); } -.gromlab-sprite-viewer__theme:focus-visible, -.gromlab-sprite-viewer__card:focus-visible, -.gromlab-sprite-viewer__close:focus-visible, -.gromlab-sprite-viewer__tab:focus-visible, -.gromlab-sprite-viewer__copy:focus-visible, -.gromlab-sprite-viewer__swatch:focus-visible { - outline: 2px solid var(--sv-accent); - outline-offset: 2px; -} -.gromlab-sprite-viewer__errors { - margin: 0 0 24px; - padding: 12px 14px; - color: var(--sv-danger); - background: rgba(180, 35, 50, .08); - border: 1px solid rgba(180, 35, 50, .28); - border-radius: 8px; - font-size: 12px; -} -.gromlab-sprite-viewer__group { margin-bottom: 40px; } -.gromlab-sprite-viewer__group-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } -.gromlab-sprite-viewer__group-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; } -.gromlab-sprite-viewer__badge { - padding: 2px 8px; - color: #ffffff; - background: var(--sv-accent); - border-radius: 999px; - font-size: 11px; - line-height: 1.5; - font-weight: 600; - letter-spacing: .04em; - text-transform: uppercase; -} -.gromlab-sprite-viewer__group-count, -.gromlab-sprite-viewer__description { color: var(--sv-muted); font-size: 13px; font-weight: 400; } -.gromlab-sprite-viewer__description { flex-basis: 100%; margin: -2px 0 0; } -.gromlab-sprite-viewer__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; } -.gromlab-sprite-viewer__card { - display: flex; - min-width: 0; - padding: 16px 8px; - color: inherit; - text-align: center; - background: var(--sv-card); - border: 0; - border-radius: 8px; - cursor: pointer; - flex-direction: column; - align-items: center; - gap: 8px; - transition: background .15s, transform .15s; -} -.gromlab-sprite-viewer__card:hover { background: var(--sv-card-hover); transform: translateY(-1px); } -.gromlab-sprite-viewer__icon-wrap, -.gromlab-sprite-viewer__dialog-preview-canvas { - display: grid; - place-items: center; - background: conic-gradient( - var(--sv-checker-a) 25%, var(--sv-checker-b) 0 50%, - var(--sv-checker-a) 0 75%, var(--sv-checker-b) 0 - ); - background-size: 8px 8px; - border-radius: 4px; -} -.gromlab-sprite-viewer__icon-wrap { width: 128px; height: 128px; } -.gromlab-sprite-viewer__icon { display: block; width: 128px; height: 128px; color: var(--sv-text); overflow: visible; } -.gromlab-sprite-viewer__icon-name { - max-width: 100%; - overflow: hidden; - color: var(--sv-muted); - font-size: 13px; - line-height: 1.35; - text-overflow: ellipsis; - white-space: nowrap; -} -.gromlab-sprite-viewer__status { - padding: 40px 20px; - color: var(--sv-muted); - text-align: center; - background: var(--sv-card); - border: 1px dashed var(--sv-border); - border-radius: 8px; -} -.gromlab-sprite-viewer__footer { - display: flex; - align-items: center; - justify-content: center; - gap: 12px; - margin-top: 40px; - padding-top: 16px; - color: var(--sv-muted); - border-top: 1px solid var(--sv-border); - font-size: 13px; -} -.gromlab-sprite-viewer__footer a { color: var(--sv-accent); text-decoration: none; } -.gromlab-sprite-viewer__footer a:hover { text-decoration: underline; } -.gromlab-sprite-viewer__dialog { - width: min(560px, calc(100vw - 32px)); - max-width: none; - max-height: calc(100dvh - 48px); - padding: 0; - color: var(--sv-text); - background: transparent; - border: 0; - overflow: visible; -} -.gromlab-sprite-viewer__dialog::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); } -.gromlab-sprite-viewer__dialog-shell { - position: relative; - max-height: calc(100dvh - 48px); - padding: 24px; - overflow-y: auto; - color: var(--sv-text); - background: var(--sv-bg); - border: 1px solid var(--sv-border); - border-radius: 12px; - box-shadow: 0 24px 72px rgba(0, 0, 0, .28); -} -.gromlab-sprite-viewer__close { - position: absolute; - z-index: 2; - top: 12px; - right: 12px; - display: grid; - place-items: center; - width: 34px; - height: 34px; - padding: 0; - color: var(--sv-text); - background: var(--sv-bg); - border: 1px solid var(--sv-border); - border-radius: 8px; - cursor: pointer; -} -.gromlab-sprite-viewer__close:hover { background: var(--sv-card-hover); } -.gromlab-sprite-viewer__dialog-preview { display: flex; align-items: center; justify-content: center; padding: 24px; margin-bottom: 16px; background: var(--sv-card); border-radius: 8px; } -.gromlab-sprite-viewer__dialog-preview-canvas { width: 256px; height: 256px; } -.gromlab-sprite-viewer__dialog-icon, -.gromlab-sprite-viewer__dialog-img, -.gromlab-sprite-viewer__dialog-mask { display: block; width: 256px; height: 256px; } -.gromlab-sprite-viewer__dialog-icon { color: var(--sv-text); overflow: visible; } -.gromlab-sprite-viewer__dialog-img { object-fit: contain; } -.gromlab-sprite-viewer__dialog-heading { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; } -.gromlab-sprite-viewer__dialog-title { margin: 0; font: 600 16px/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__viewbox { - padding: 2px 8px; - color: var(--sv-muted); - background: var(--sv-card); - border: 1px solid var(--sv-border); - border-radius: 999px; - font-size: 11px; - white-space: nowrap; -} -.gromlab-sprite-viewer__dialog-meta { margin: 0 0 20px; color: var(--sv-muted); text-align: center; font-size: 12px; } -.gromlab-sprite-viewer__colors { margin-bottom: 20px; } -.gromlab-sprite-viewer__hint { - margin: 0 0 12px; - padding: 8px 12px; - color: var(--sv-muted); - background: var(--sv-card); - border-left: 3px solid var(--sv-accent); - border-radius: 4px; - font-size: 12px; - line-height: 1.5; -} -.gromlab-sprite-viewer__colors-title { margin: 0 0 8px; color: var(--sv-muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; } -.gromlab-sprite-viewer__color-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: 32px; margin-bottom: 6px; } -.gromlab-sprite-viewer__swatch { width: 26px; height: 26px; flex: 0 0 auto; padding: 0; border: 1px solid var(--sv-border); border-radius: 4px; cursor: pointer; } -.gromlab-sprite-viewer__color-label { min-width: 0; overflow-wrap: anywhere; color: var(--sv-muted); font: 12px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__color-popover { - position: absolute; - z-index: 5; - bottom: calc(100% + 6px); - left: 0; - width: 224px; - max-width: calc(100vw - 64px); - padding: 12px; - background: var(--sv-bg); - border: 1px solid var(--sv-border); - border-radius: 8px; - box-shadow: 0 8px 28px rgba(0, 0, 0, .22); -} -.gromlab-sprite-viewer__color-picker { display: flex; flex-direction: column; width: 198px; max-width: 100%; height: 160px; } -.gromlab-sprite-viewer__hex-input { display: block; width: 100%; margin-top: 8px; } -.gromlab-sprite-viewer__hex-input::part(input) { box-sizing: border-box; display: block; width: 100%; height: 32px; padding: 0 8px; color: var(--sv-text); text-align: center; background: var(--sv-card); border: 1px solid var(--sv-border); border-radius: 4px; outline: none; font: 12px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__hex-input::part(input):focus { border-color: var(--sv-accent); } -.gromlab-sprite-viewer__tabs { display: flex; overflow-x: auto; margin-bottom: 12px; border-bottom: 1px solid var(--sv-border); } -.gromlab-sprite-viewer__tab { flex: 0 0 auto; padding: 8px 16px; color: var(--sv-muted); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 12px; font-weight: 600; } -.gromlab-sprite-viewer__tab[aria-selected="true"] { color: var(--sv-accent); border-bottom-color: var(--sv-accent); } -.gromlab-sprite-viewer__code { position: relative; overflow: hidden; background: var(--sv-code); border-radius: 8px; } -.gromlab-sprite-viewer__code pre { min-height: 72px; margin: 0; padding: 16px 70px 16px 16px; overflow-x: auto; font: 12px/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__copy { position: absolute; top: 8px; right: 8px; padding: 4px 8px; color: var(--sv-muted); background: var(--sv-bg); border: 1px solid var(--sv-border); border-radius: 4px; cursor: pointer; font-size: 11px; } -.gromlab-sprite-viewer__copy:hover { color: var(--sv-text); } -.gromlab-sprite-viewer__code .hl-tag { color: #116329; } -.gromlab-sprite-viewer__code .hl-attr, -.gromlab-sprite-viewer__code .hl-number, -.gromlab-sprite-viewer__code .hl-property { color: #0550ae; } -.gromlab-sprite-viewer__code .hl-string, -.gromlab-sprite-viewer__code .hl-color { color: #0a3069; } -.gromlab-sprite-viewer__code .hl-comment { color: #8b949e; } -.gromlab-sprite-viewer__code .hl-punctuation, -.gromlab-sprite-viewer__code .hl-selector { color: #6639ba; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-tag { color: #7ee787; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-attr, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-number, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-property { color: #79c0ff; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-string, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-color { color: #a5d6ff; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-punctuation, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-selector { color: #d2a8ff; } -@media (prefers-color-scheme: dark) { - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-tag { color: #7ee787; } - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-attr, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-number, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-property { color: #79c0ff; } - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-string, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-color { color: #a5d6ff; } - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-punctuation, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-selector { color: #d2a8ff; } -} -@media (max-width: 640px) { - .gromlab-sprite-viewer { padding: 16px; border-radius: 8px; } - .gromlab-sprite-viewer__header { align-items: stretch; } - .gromlab-sprite-viewer__toolbar { width: 100%; margin-left: 0; } - .gromlab-sprite-viewer__search { width: auto; flex: 1; min-width: 0; } - .gromlab-sprite-viewer__grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; } - .gromlab-sprite-viewer__icon-wrap, - .gromlab-sprite-viewer__icon { width: 104px; height: 104px; } - .gromlab-sprite-viewer__dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); } - .gromlab-sprite-viewer__dialog-shell { max-height: calc(100dvh - 20px); padding: 16px; } - .gromlab-sprite-viewer__dialog-preview { padding: 16px; } - .gromlab-sprite-viewer__dialog-preview-canvas, - .gromlab-sprite-viewer__dialog-icon, - .gromlab-sprite-viewer__dialog-img, - .gromlab-sprite-viewer__dialog-mask { width: min(256px, calc(100vw - 86px)); height: min(256px, calc(100vw - 86px)); } -} -@media (prefers-reduced-motion: reduce) { - .gromlab-sprite-viewer *, - .gromlab-sprite-viewer *::before, - .gromlab-sprite-viewer *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } -} -`,et="gromlab-sprite-viewer",be="gromlab-hex-color-picker",we="gromlab-hex-input",W;function Hr(){return customElements.get(be)&&customElements.get(we)?Promise.resolve():W||(W=Promise.all([Promise.resolve().then(()=>(Ft(),mt)),Promise.resolve().then(()=>(Wt(),_t))]).then(([{HexBase:e},{HexInputBase:t}])=>{customElements.get(be)||customElements.define(be,class extends e{}),customElements.get(we)||customElements.define(we,class extends t{})}),W)}function tt(e,t){const r=e%100,i=e%10,o=r>=11&&r<=19?t[2]:i===1?t[0]:i>=2&&i<=4?t[1]:t[2];return`${e} ${o}`}function Ur(){return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function rt(e,t){return Object.fromEntries(e.colors.map(({variable:r,fallback:i})=>[r,R(i,t)]))}var Nr=class extends U{static properties={sources:{attribute:!1},viewerTitle:{attribute:"viewer-title"},colorTheme:{attribute:"color-theme"},themeControlled:{attribute:!1},showThemeToggle:{attribute:!1},manifestUrl:{attribute:"manifest-url"},spriteUrl:{attribute:"sprite-url"},_manifests:{state:!0},_errors:{state:!0},_loading:{state:!0},_query:{state:!0},_systemTheme:{state:!0},_selected:{state:!0},_activeTab:{state:!0},_colors:{state:!0},_colorOverrides:{state:!0},_cssColor:{state:!0},_cssColorOverridden:{state:!0},_openColorControl:{state:!0},_copied:{state:!0}};static styles=wt(Pr);_loadVersion=0;_copyTimeout;_media;constructor(){super(),this.sources=[],this.viewerTitle="SVG Sprites",this.colorTheme="auto",this.themeControlled=!1,this.showThemeToggle=!0,this._manifests=[],this._errors=[],this._loading=!1,this._query="",this._systemTheme=Ur(),this._selected=null,this._activeTab="svg",this._colors={},this._colorOverrides={},this._cssColor="#1a1a1a",this._cssColorOverridden=!1,this._openColorControl=null,this._copied=!1}_handleMediaChange=()=>{this._systemTheme=this._media?.matches?"dark":"light",this._syncThemeColors()};_handleDocumentPointerDown=e=>{if(!this._openColorControl)return;e.composedPath().some(r=>r instanceof HTMLElement&&(r.dataset.colorTrigger===this._openColorControl||r.dataset.colorPopover===this._openColorControl))||(this._openColorControl=null)};connectedCallback(){super.connectedCallback(),Hr(),this._media=globalThis.matchMedia?.("(prefers-color-scheme: dark)"),this._systemTheme=this._media?.matches?"dark":"light",this._media?.addEventListener("change",this._handleMediaChange),globalThis.document?.addEventListener("pointerdown",this._handleDocumentPointerDown,!0)}disconnectedCallback(){this._media?.removeEventListener("change",this._handleMediaChange),globalThis.document?.removeEventListener("pointerdown",this._handleDocumentPointerDown,!0),this._copyTimeout&&clearTimeout(this._copyTimeout),super.disconnectedCallback()}updated(e){(e.has("sources")||e.has("manifestUrl")||e.has("spriteUrl"))&&this._loadSources(),e.has("colorTheme")&&this._syncThemeColors()}get _resolvedColorTheme(){return this.colorTheme==="auto"?this._systemTheme:this.colorTheme}get _themeColor(){return this._resolvedColorTheme==="dark"?"#e5e5e5":"#1a1a1a"}_effectiveSources(){const e=Xe(this.sources);return e.length>0?e:this.manifestUrl&&this.spriteUrl?[{manifestUrl:this.manifestUrl,spriteUrl:this.spriteUrl}]:[]}async _loadSources(){const e=++this._loadVersion,t=this._effectiveSources(),r=[],i=[],o=[];this.manifestUrl&&!this.spriteUrl&&Xe(this.sources).length===0&&o.push("The sprite-url attribute is required with manifest-url.");for(const n of t){if(typeof n=="function"||Dt(n)){i.push(n);continue}try{r.push(ee(n))}catch(l){o.push(l instanceof Error?l.message:String(l))}}if(this._manifests=r.sort(Qe),this._errors=o,this._loading=i.length>0,this._selected=null,i.length===0)return;const s=await Promise.allSettled(i.map(Or));if(e!==this._loadVersion)return;const a=[];for(const n of s)n.status==="fulfilled"?a.push(n.value):o.push(n.reason instanceof Error?n.reason.message:String(n.reason));this._manifests=[...r,...a].sort(Qe),this._errors=[...o],this._loading=!1}_syncThemeColors(){this._selected&&(this._colors={...rt(this._selected.icon,this._themeColor),...this._colorOverrides},this._cssColorOverridden||(this._cssColor=this._themeColor))}_toggleTheme(){const e=this._resolvedColorTheme==="dark"?"light":"dark";this.themeControlled||(this.colorTheme=e),this.dispatchEvent(new CustomEvent("color-theme-change",{bubbles:!0,composed:!0,detail:{theme:e}}))}async _selectIcon(e,t){const r=`${e.name}:${e.spriteUrl}:${t.id}`;this._selected={key:r,manifest:e,icon:t},this._activeTab=fe(e)[0]?.id??"svg",this._colorOverrides={},this._colors=rt(t,this._themeColor),this._cssColor=this._themeColor,this._cssColorOverridden=!1,this._openColorControl=null,this._copied=!1,await this.updateComplete;const i=this.renderRoot.querySelector("dialog");i&&!i.open&&i.showModal()}_closeDialog(){const e=this.renderRoot.querySelector("dialog");e?.open&&e.close(),this._selected=null,this._openColorControl=null}_handleBackdropClick(e){if(!(e.currentTarget instanceof HTMLDialogElement)||e.target!==e.currentTarget)return;const t=e.currentTarget.getBoundingClientRect();(e.clientXt.right||e.clientYt.bottom)&&this._closeDialog()}_handleTabKeyDown(e,t){if(!this._selected)return;const r=fe(this._selected.manifest);let i=null;if(e.key==="ArrowRight"&&(i=(t+1)%r.length),e.key==="ArrowLeft"&&(i=(t-1+r.length)%r.length),e.key==="Home"&&(i=0),e.key==="End"&&(i=r.length-1),i===null)return;e.preventDefault(),this._activeTab=r[i].id;const o=this.renderRoot.querySelectorAll('[role="tab"]');this.updateComplete.then(()=>o[i]?.focus())}_handleColorChange(e,t){const r=R(t);this._colors={...this._colors,[e]:r},this._colorOverrides={...this._colorOverrides,[e]:r}}_handleCssColorChange(e){this._cssColor=R(e),this._cssColorOverridden=!0}async _copyCode(e){if(globalThis.navigator?.clipboard)try{await globalThis.navigator.clipboard.writeText(e),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=setTimeout(()=>{this._copied=!1},1500)}catch{this._copied=!1}}_renderColorControl(e,t,r,i){const o=this._openColorControl===r,s=`color-${r.replace(/[^a-zA-Z0-9_-]/g,"-")}`;return p` -
- - ${e} - ${o?p` - - `:c} -
- `}_renderDialogPreview(e,t){const r=`${e.spriteUrl}#${t.id}`;return this._activeTab==="img"?p`${t.name}`:this._activeTab==="css"?p` - - `:p` - - - - `}_renderDialog(){if(!this._selected)return c;const{manifest:e,icon:t}=this._selected,r=fe(e),i=r.some(n=>n.id===this._activeTab)?this._activeTab:r[0].id,o=yr({manifest:e,icon:t,tab:i,colorOverrides:this._colorOverrides,cssColor:this._cssColor}),s=wr(t.viewBox),a=i!=="img"&&i!=="css";return p` - {n.preventDefault(),this._closeDialog()}} - @click=${this._handleBackdropClick} - > -
- - -
-
- ${this._renderDialogPreview(e,t)} -
-
- -
-

${t.name}

- ${s?p`${s}`:c} -
-

${e.name} · ${e.format} · ${e.target}

- -
- ${a&&t.colors.length>0?p` -

- Цвета применяются к превью через CSS-переменные и попадут в пример кода. -

-

CSS Variables

- ${t.colors.map(({variable:n,fallback:l})=>this._renderColorControl(`${n}: ${l}`,this._colors[n],n,g=>this._handleColorChange(n,g)))} - `:c} - ${a&&t.colors.length===0?p` -

У иконки нет настраиваемых цветовых переменных.

- `:c} - ${i==="img"?p` -

- IMG изолирует SVG: CSS-переменные и currentColor внутрь изображения не передаются. -

- `:c} - ${i==="css"?p` -

- CSS mask отображает иконку одним цветом через background-color. -

- ${this._renderColorControl("background-color",this._cssColor,"background-color",n=>this._handleCssColorChange(n))} - `:c} -
- -
- ${r.map((n,l)=>p` - - `)} -
- -
-
${_r(Sr(o.code,o.language))}
- -
-
-
- `}render(){const e=this._query.trim().toLowerCase(),t=this._manifests.map(o=>({manifest:o,icons:o.icons.filter(s=>e===""||s.name.toLowerCase().includes(e)||o.name.toLowerCase().includes(e))})).filter(o=>o.icons.length>0),r=this._manifests.reduce((o,s)=>o+s.iconCount,0),i=t.reduce((o,s)=>o+s.icons.length,0);return p` -
-
-

${this.viewerTitle}

- - ${tt(this._manifests.length,["спрайт","спрайта","спрайтов"])} - · ${tt(r,["иконка","иконки","иконок"])} - ${e?` · найдено ${i}`:c} - -
- {this._query=o.currentTarget.value}} - placeholder="Найти иконку" - aria-label="Поиск иконок" - > - ${this.showThemeToggle?p` - - `:c} -
-
- - ${this._errors.length>0?p` - - `:c} - - ${t.map(({manifest:o,icons:s})=>p` -
-
-

${o.name}

- ${o.format} - ${s.length} - ${o.description?p` -

${o.description}

- `:c} -
-
- ${s.map(a=>p` - - `)} -
-
- `)} - - ${t.length===0&&(!this._loading||this._manifests.length>0)?p` -
- ${this._manifests.length===0?"Спрайты не подключены":"Иконки не найдены"} -
- `:c} - ${this._loading&&this._manifests.length===0?p` -
Загрузка спрайтов...
- `:c} - - - - ${this._renderDialog()} -
- `}};function Dr(){customElements.get(et)||customElements.define(et,Nr)}Dr();/*! Bundled license information: - -@lit/reactive-element/css-tag.js: - (** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -@lit/reactive-element/reactive-element.js: -lit-html/lit-html.js: -lit-element/lit-element.js: -lit-html/directive.js: -lit-html/directives/unsafe-html.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/is-server.js: - (** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directives/if-defined.js: -lit-html/directives/style-map.js: - (** - * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) -*/export{Dr as defineSpriteViewerElement}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/.vite/manifest.json b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/.vite/manifest.json deleted file mode 100644 index df67611..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/.vite/manifest.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "../../../dist/viewer-element.js": { - "file": "assets/viewer-element-BO6fulPI.js", - "name": "viewer-element", - "src": "../../../dist/viewer-element.js", - "isDynamicEntry": true - }, - "_index-AIk5O37p.js": { - "file": "assets/index-AIk5O37p.js", - "name": "index", - "isDynamicEntry": true, - "dynamicImports": [ - "../../../dist/viewer-element.js", - "src/sprite/.svg-sprite/svg-sprite.manifest.js" - ], - "css": [ - "assets/index-BWUdTtCi.css" - ], - "assets": [ - "assets/sprite-DvsqBNon.svg" - ] - }, - "_index-BWUdTtCi.css": { - "file": "assets/index-BWUdTtCi.css", - "src": "_index-BWUdTtCi.css" - }, - "_server-fns-XxvbTHGR.js": { - "file": "assets/server-fns-XxvbTHGR.js", - "name": "server-fns", - "dynamicImports": [ - "src/routes/index.jsx?pick=default&pick=$css", - "src/routes/index.jsx?pick=default&pick=$css", - "src/app.jsx" - ] - }, - "src/app.jsx": { - "file": "assets/app-Bgr52ZUm.js", - "name": "app", - "src": "src/app.jsx", - "isDynamicEntry": true, - "imports": [ - "_server-fns-XxvbTHGR.js" - ], - "css": [ - "assets/app-BVONibDl.css" - ] - }, - "src/routes/index.jsx?pick=default&pick=$css": { - "file": "index.js", - "name": "index", - "src": "src/routes/index.jsx?pick=default&pick=$css", - "isEntry": true, - "imports": [ - "_index-AIk5O37p.js" - ] - }, - "src/sprite/.svg-sprite/sprite.svg": { - "file": "assets/sprite-DvsqBNon.svg", - "src": "src/sprite/.svg-sprite/sprite.svg" - }, - "src/sprite/.svg-sprite/svg-sprite.manifest.js": { - "file": "assets/svg-sprite.manifest-D0DHYqq2.js", - "name": "svg-sprite.manifest", - "src": "src/sprite/.svg-sprite/svg-sprite.manifest.js", - "isDynamicEntry": true, - "imports": [ - "_index-AIk5O37p.js" - ] - }, - "virtual:$vinxi/handler/server-fns": { - "file": "server-fns.js", - "name": "server-fns", - "src": "virtual:$vinxi/handler/server-fns", - "isEntry": true, - "imports": [ - "_server-fns-XxvbTHGR.js" - ] - } -} \ No newline at end of file diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/app-BVONibDl.css b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/app-BVONibDl.css deleted file mode 100644 index b9cce31..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/app-BVONibDl.css +++ /dev/null @@ -1 +0,0 @@ -:root{font-family:system-ui,sans-serif;color:#172033;background:#fff}body{margin:0;padding:40px}.viewer{margin-top:32px} diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/app-Bgr52ZUm.js b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/app-Bgr52ZUm.js deleted file mode 100644 index 387cccc..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/app-Bgr52ZUm.js +++ /dev/null @@ -1 +0,0 @@ -import{isServer as k,getRequestEvent as T,createComponent as S,delegateEvents as ye}from"solid-js/web";import{F as ve}from"./server-fns-XxvbTHGR.js";import{getOwner as Q,runWithOwner as Y,createMemo as L,createSignal as j,createRenderEffect as be,on as N,useContext as Re,createContext as Z,startTransition as Pe,resetErrorBoundaries as Le,batch as Se,untrack as ee,createComponent as Ae,children as Ee,Show as te,createRoot as Ce,onCleanup as ne,sharedConfig as $,Suspense as xe}from"solid-js";import"cookie-es";import"solid-js/web/storage";import"h3";import"unctx";import"node:async_hooks";import"radix3";import"seroval";import"seroval-plugins/web";function re(){let e=new Set;function t(n){return e.add(n),()=>e.delete(n)}let r=!1;function o(n,a){if(r)return!(r=!1);const s={to:n,options:a,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const i of e)i.listener({...s,from:i.location,retry:h=>{h&&(r=!0),i.navigate(n,{...a,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:o}}let M;function z(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),M=window.history.state._depth}k||z();function Oe(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function Ue(e,t){let r=!1;return()=>{const o=M;z();const n=o==null?null:M-o;if(r){r=!1;return}n&&t(n)?(r=!0,window.history.go(-n)):e()}}const Fe=/^(?:[a-z0-9]+:)?\/\//i,ke=/^\/+|(\/)\/+$/g,oe="http://sr";function B(e,t=!1){const r=e.replace(ke,"$1");return r?t||/^[?#]/.test(r)?r:"/"+r:""}function D(e,t,r){if(Fe.test(t))return;const o=B(e),n=r&&B(r);let a="";return!n||t.startsWith("/")?a=o:n.toLowerCase().indexOf(o.toLowerCase())!==0?a=o+n:a=n,(a||"/")+B(t,!a)}function qe(e,t){return B(e).replace(/\/*(\*.*)?$/g,"")+B(t)}function ae(e){const t={};return e.searchParams.forEach((r,o)=>{o in t?Array.isArray(t[o])?t[o].push(r):t[o]=[t[o],r]:t[o]=r}),t}function je(e,t,r){const[o,n]=e.split("/*",2),a=o.split("/").filter(Boolean),s=a.length;return i=>{const h=i.split("/").filter(Boolean),c=h.length-s;if(c<0||c>0&&n===void 0&&!t)return null;const d={path:s?"":"/",params:{}},y=m=>r===void 0?void 0:r[m];for(let m=0;mo===e;return t===void 0?!0:typeof t=="string"?r(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(r):t instanceof RegExp?t.test(e):!1}function Be(e){const[t,r]=e.pattern.split("/*",2),o=t.split("/").filter(Boolean);return o.reduce((n,a)=>n+(a.startsWith(":")?2:3),o.length-(r===void 0?0:1))}function se(e){const t=new Map,r=Q();return new Proxy({},{get(o,n){return t.has(n)||Y(r,()=>t.set(n,L(()=>e()[n]))),t.get(n)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(o,n){return n in e()}})}function ie(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let r=e.slice(0,t.index),o=e.slice(t.index+t[0].length);const n=[r,r+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(o);)n.push(r+=t[1]),o=o.slice(t[0].length);return ie(o).reduce((a,s)=>[...a,...n.map(i=>i+s)],[])}const Ie=100,_e=Z(),ce=Z();function We(e,t=""){const{component:r,preload:o,load:n,children:a,info:s}=e,i=!a||Array.isArray(a)&&!a.length,h={key:e,component:r,preload:o||n,info:s};return ue(e.path).reduce((c,d)=>{for(const y of ie(d)){const m=qe(t,y);let g=i?m:m.split("/*",1)[0];g=g.split("/").map(b=>b.startsWith(":")||b.startsWith("*")?b:encodeURIComponent(b)).join("/"),c.push({...h,originalPath:d,pattern:g,matcher:je(g,!i,e.matchFilters)})}return c},[])}function De(e,t=0){return{routes:e,score:Be(e[e.length-1])*1e4-t,matcher(r){const o=[];for(let n=e.length-1;n>=0;n--){const a=e[n],s=a.matcher(r);if(!s)return null;o.unshift({...s,route:a})}return o}}}function ue(e){return Array.isArray(e)?e:[e]}function le(e,t="",r=[],o=[]){const n=ue(e);for(let a=0,s=n.length;as.score-a.score)}function I(e,t){for(let r=0,o=e.length;r{const y=e();try{return new URL(y,o)}catch{return console.error(`Invalid path ${y}`),d}},o,{equals:(d,y)=>d.href===y.href}),a=L(()=>n().pathname),s=L(()=>n().search,!0),i=L(()=>n().hash),h=()=>"",c=N(s,()=>ae(n()));return{get pathname(){return a()},get search(){return s()},get hash(){return i()},get state(){return t()},get key(){return h()},query:r?r(c):se(c)}}let C;function $e(){return C}function Ke(e,t,r,o={}){const{signal:[n,a],utils:s={}}=e,i=s.parsePath||(f=>f),h=s.renderPath||(f=>f),c=s.beforeLeave||re(),d=D("",o.base||"");if(d===void 0)throw new Error(`${d} is not a valid base path`);d&&!n().value&&a({value:d,replace:!0,scroll:!1});const[y,m]=j(!1);let g;const b=(f,p)=>{p.value===u()&&p.state===v()||(g===void 0&&m(!0),C=f,g=p,Pe(()=>{g===p&&(l(g.value),w(g.state),Le(),k||E[1](R=>R.filter(x=>x.pending)))}).finally(()=>{g===p&&Se(()=>{C=void 0,f==="navigate"&&pe(g),m(!1),g=void 0})}))},[u,l]=j(n().value),[v,w]=j(n().state),A=Te(u,v,s.queryWrapper),P=[],E=j(k?we():[]),q=L(()=>typeof o.transformUrl=="function"?I(t(),o.transformUrl(A.pathname)):I(t(),A.pathname)),H=()=>{const f=q(),p={};for(let R=0;Rd,outlet:()=>null,resolvePath(f){return D(d,f)}};return be(N(n,f=>b("native",f),{defer:!0})),{base:V,location:A,params:fe,isRouting:y,renderPath:h,parsePath:i,navigatorFactory:me,matches:q,beforeLeave:c,preloadRoute:ge,singleFlight:o.singleFlight===void 0?!0:o.singleFlight,submissions:E};function de(f,p,R){ee(()=>{if(typeof p=="number"){p&&(s.go?s.go(p):console.warn("Router integration does not support relative routing"));return}const x=!p||p[0]==="?",{replace:_,resolve:O,scroll:W,state:U}={replace:!1,resolve:!x,scroll:!0,...R},F=O?f.resolvePath(p):D(x&&A.pathname||"",p);if(F===void 0)throw new Error(`Path '${p}' is not a routable path`);if(P.length>=Ie)throw new Error("Too many redirects");const J=u();if(F!==J||U!==v())if(k){const X=T();X&&(X.response={status:302,headers:new Headers({Location:F})}),a({value:F,replace:_,scroll:W,state:U})}else c.confirm(F,R)&&(P.push({value:J,replace:_,scroll:W,state:v()}),b("navigate",{value:F,state:U}))})}function me(f){return f=f||Re(ce)||V,(p,R)=>de(f,p,R)}function pe(f){const p=P[0];p&&(a({...f,replace:p.replace,scroll:p.scroll}),P.length=0)}function ge(f,p){const R=I(t(),f.pathname),x=C;C="preload";for(let _ in R){const{route:O,params:W}=R[_];O.component&&O.component.preload&&O.component.preload();const{preload:U}=O;p&&U&&Y(r(),()=>U({params:W,location:{pathname:f.pathname,search:f.search,hash:f.hash,query:ae(f),state:null,key:""},intent:"preload"}))}C=x}function we(){const f=T();return f&&f.router&&f.router.submission?[f.router.submission]:[]}}function Me(e,t,r,o){const{base:n,location:a,params:s}=e,{pattern:i,component:h,preload:c}=o().route,d=L(()=>o().path);h&&h.preload&&h.preload();const y=c?c({params:s,location:a,intent:C||"initial"}):void 0;return{parent:t,pattern:i,path:d,outlet:()=>h?Ae(h,{params:s,location:a,data:y,get children(){return r()}}):r(),resolvePath(g){return D(n.path(),g,d())}}}const he=e=>t=>{const{base:r}=t,o=Ee(()=>t.children),n=L(()=>le(o(),t.base||""));let a;const s=Ke(e,n,()=>a,{base:r,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),S(_e.Provider,{value:s,get children(){return S(Ne,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[(a=Q())&&null,S(ze,{routerState:s,get branches(){return n()}})]}})}})};function Ne(e){const t=e.routerState.location,r=e.routerState.params,o=L(()=>e.preload&&ee(()=>{e.preload({params:r,location:t,intent:$e()||"initial"})}));return S(te,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:n=>S(n,{params:r,location:t,get data(){return o()},get children(){return e.children}})})}function ze(e){if(k){const n=T();if(n&&n.router&&n.router.dataOnly){He(n,e.routerState,e.branches);return}n&&((n.router||(n.router={})).matches||(n.router.matches=e.routerState.matches().map(({route:a,path:s,params:i})=>({path:a.originalPath,pattern:a.pattern,match:s,params:i,info:a.info}))))}const t=[];let r;const o=L(N(e.routerState.matches,(n,a,s)=>{let i=a&&n.length===a.length;const h=[];for(let c=0,d=n.length;c{t[c]=g,h[c]=Me(e.routerState,h[c-1]||e.routerState.base,G(()=>o()[c+1]),()=>{const b=e.routerState.matches();return b[c]??b[0]})}))}return t.splice(n.length).forEach(c=>c()),s&&i?s:(r=h[0],h)}));return G(()=>o()&&r)()}const G=e=>()=>S(te,{get when(){return e()},keyed:!0,children:t=>S(ce.Provider,{value:t,get children(){return t.outlet()}})});function He(e,t,r){const o=new URL(e.request.url),n=I(r,new URL(e.router.previousUrl||e.request.url).pathname),a=I(r,o.pathname);for(let s=0;st(o(n)):t]}function Je(e){let t=!1;const r=n=>typeof n=="string"?{value:n}:n,o=Ve(j(r(e.get()),{equals:(n,a)=>n.value===a.value&&n.state===a.state}),void 0,n=>(!t&&e.set(n),$.registry&&!$.done&&($.done=!0),n));return e.init&&ne(e.init((n=e.get())=>{t=!0,o[1](r(n)),t=!1})),he({signal:o,create:e.create,utils:e.utils})}function Xe(e,t,r){return e.addEventListener(t,r),()=>e.removeEventListener(t,r)}function Ge(e,t){const r=e&&document.getElementById(e);r?r.scrollIntoView():t&&window.scrollTo(0,0)}function Qe(e){const t=new URL(e);return t.pathname+t.search}function Ye(e){let t;const r={value:e.url||(t=T())&&Qe(t.request.url)||""};return he({signal:[()=>r,o=>Object.assign(r,o)]})(e)}const Ze=new Map;function et(e=!0,t=!1,r="/_server",o){return n=>{const a=n.base.path(),s=n.navigatorFactory(n.base);let i,h;function c(u){return u.namespaceURI==="http://www.w3.org/2000/svg"}function d(u){if(u.defaultPrevented||u.button!==0||u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)return;const l=u.composedPath().find(q=>q instanceof Node&&q.nodeName.toUpperCase()==="A");if(!l||t&&!l.hasAttribute("link"))return;const v=c(l),w=v?l.href.baseVal:l.href;if((v?l.target.baseVal:l.target)||!w&&!l.hasAttribute("state"))return;const P=(l.getAttribute("rel")||"").split(/\s+/);if(l.hasAttribute("download")||P&&P.includes("external"))return;const E=v?new URL(w,document.baseURI):new URL(w);if(!(E.origin!==window.location.origin||a&&E.pathname&&!E.pathname.toLowerCase().startsWith(a.toLowerCase())))return[l,E]}function y(u){const l=d(u);if(!l)return;const[v,w]=l,A=n.parsePath(w.pathname+w.search+w.hash),P=v.getAttribute("state");u.preventDefault(),s(A,{resolve:!1,replace:v.hasAttribute("replace"),scroll:!v.hasAttribute("noscroll"),state:P?JSON.parse(P):void 0})}function m(u){const l=d(u);if(!l)return;const[v,w]=l;o&&(w.pathname=o(w.pathname)),n.preloadRoute(w,v.getAttribute("preload")!=="false")}function g(u){clearTimeout(i);const l=d(u);if(!l)return h=null;const[v,w]=l;h!==v&&(o&&(w.pathname=o(w.pathname)),i=setTimeout(()=>{n.preloadRoute(w,v.getAttribute("preload")!=="false"),h=v},20))}function b(u){if(u.defaultPrevented)return;let l=u.submitter&&u.submitter.hasAttribute("formaction")?u.submitter.getAttribute("formaction"):u.target.getAttribute("action");if(!l)return;if(!l.startsWith("https://action/")){const w=new URL(l,oe);if(l=n.parsePath(w.pathname+w.search),!l.startsWith(r))return}if(u.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const v=Ze.get(l);if(v){u.preventDefault();const w=new FormData(u.target,u.submitter);v.call({r:n,f:u.target},u.target.enctype==="multipart/form-data"?w:new URLSearchParams(w))}}ye(["click","submit"]),document.addEventListener("click",y),e&&(document.addEventListener("mousemove",g,{passive:!0}),document.addEventListener("focusin",m,{passive:!0}),document.addEventListener("touchstart",m,{passive:!0})),document.addEventListener("submit",b),ne(()=>{document.removeEventListener("click",y),e&&(document.removeEventListener("mousemove",g),document.removeEventListener("focusin",m),document.removeEventListener("touchstart",m)),document.removeEventListener("submit",b)})}}function tt(e){if(k)return Ye(e);const t=()=>{const o=window.location.pathname.replace(/^\/+/,"/")+window.location.search,n=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:o+window.location.hash,state:n}},r=re();return Je({get:t,set({value:o,replace:n,scroll:a,state:s}){n?window.history.replaceState(Oe(s),"",o):window.history.pushState(s,"",o),Ge(decodeURIComponent(window.location.hash.slice(1)),a),z()},init:o=>Xe(window,"popstate",Ue(o,n=>{if(n)return!r.confirm(n);{const a=t();return!r.confirm(a.value,{state:a.state})}})),create:et(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:o=>window.history.go(o),beforeLeave:r}})(e)}function dt(){return S(tt,{root:e=>S(xe,{get children(){return e.children}}),get children(){return S(ve,{})}})}export{dt as default}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/index-AIk5O37p.js b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/index-AIk5O37p.js deleted file mode 100644 index d4d8677..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/index-AIk5O37p.js +++ /dev/null @@ -1 +0,0 @@ -import{createComponent as p,ssrElement as n,mergeProps as i,ssr as r,ssrAttribute as c,escape as s,ssrHydrationKey as u}from"solid-js/web";import{splitProps as m,Show as d,onMount as v}from"solid-js";const w="_root_1egzq_3",h="_wrap_1egzq_9",l={root:w,wrap:h},g={check:"check"},f="/_server/assets/sprite-DvsqBNon.svg";var _=[""],k=[""];const y=t=>{const[e,o]=m(t,["icon","wrapped","class"]),a=()=>f+"#"+g[e.icon];return p(d,{get when(){return e.wrapped},get fallback(){return n("svg",i(o,{get class(){return[l.root,e.class].filter(Boolean).join(" ")}}),()=>r(k,c("href",s(a(),!0),!1)),!0)},get children(){return n("span",i(o,{get class(){return[l.wrap,e.class].filter(Boolean).join(" ")}}),()=>r(_,c("href",s(a(),!0),!1)),!0)}})};var S=["

SolidStart + Vite

",'
'];function H(){let t;return v(async()=>{await import("./viewer-element-BO6fulPI.js");const e=document.createElement("gromlab-sprite-viewer");e.viewerTitle="SolidStart Vite Viewer",e.sources=[()=>import("./svg-sprite.manifest-D0DHYqq2.js")],t.append(e)}),r(S,u(),s(p(y,{"data-testid":"icon","data-app":"solid-start-vite",icon:"check","aria-label":"Check icon",width:64,height:64,style:{"--icon-color-1":"#16a34a"}})))}export{H,f as s}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/index-BWUdTtCi.css b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/index-BWUdTtCi.css deleted file mode 100644 index 013ec25..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/index-BWUdTtCi.css +++ /dev/null @@ -1 +0,0 @@ -._root_1egzq_3{transition-property:fill,stroke,color;transition-duration:.3s;transition-timing-function:ease}._wrap_1egzq_9{display:inline-flex}._wrap_1egzq_9 svg{width:100%;height:100%;transition-property:fill,stroke,color;transition-duration:.3s;transition-timing-function:ease} diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/server-fns-XxvbTHGR.js b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/server-fns-XxvbTHGR.js deleted file mode 100644 index bd384e5..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/server-fns-XxvbTHGR.js +++ /dev/null @@ -1 +0,0 @@ -import{parseSetCookie as G}from"cookie-es";import{lazy as K,createComponent as V,sharedConfig as I}from"solid-js";import{ssrElement as R,escape as Z,mergeProps as Q,ssr as Y,isServer as ee,getRequestEvent as te,renderToString as ne}from"solid-js/web";import{provideRequestEvent as O}from"solid-js/web/storage";import{H3Event as T,getRequestIP as re,parseCookies as se,getResponseStatus as oe,getResponseStatusText as ae,getCookie as ie,setCookie as ce,getResponseHeader as ue,setResponseHeader as le,removeResponseHeader as de,getResponseHeaders as pe,getRequestURL as fe,getRequestWebStream as he,setResponseStatus as ge,appendResponseHeader as me,setHeader as Re,eventHandler as ye}from"h3";import{getContext as Se}from"unctx";import{AsyncLocalStorage as we}from"node:async_hooks";import{createRouter as be}from"radix3";import{Feature as ve,fromJSON as $e,crossSerializeStream as Te,getCrossReferenceHeader as xe,toCrossJSONStream as Ee}from"seroval";import{AbortSignalPlugin as qe,CustomEventPlugin as He,DOMExceptionPlugin as Ae,EventPlugin as Ce,FormDataPlugin as ke,HeadersPlugin as Pe,ReadableStreamPlugin as Fe,RequestPlugin as Le,ResponsePlugin as Ie,URLSearchParamsPlugin as Oe,URLPlugin as Ue}from"seroval-plugins/web";function _e(e){let n;const t=_(e),s={duplex:"half",method:e.method,headers:e.headers};return e.node.req.body instanceof ArrayBuffer?new Request(t,{...s,body:e.node.req.body}):new Request(t,{...s,get body(){return n||(n=Ge(e),n)}})}function je(e){return e.web??={request:_e(e),url:_(e)},e.web.request}function Ne(){return Qe()}const U=Symbol("$HTTPEvent");function Me(e){return typeof e=="object"&&(e instanceof T||e?.[U]instanceof T||e?.__is_event__===!0)}function u(e){return function(...n){let t=n[0];if(Me(t))n[0]=t instanceof T||t.__is_event__?t:t[U];else{if(!globalThis.app.config.server.experimental?.asyncContext)throw new Error("AsyncLocalStorage was not enabled. Use the `server.experimental.asyncContext: true` option in your app configuration to enable it. Or, pass the instance of HTTPEvent that you have as the first argument to the function.");if(t=Ne(),!t)throw new Error("No HTTPEvent found in AsyncLocalStorage. Make sure you are using the function within the server runtime.");n.unshift(t)}return e(...n)}}const _=u(fe),De=u(re),S=u(ge),q=u(oe),We=u(ae),y=u(pe),H=u(ue),Be=u(le),j=u(me),ze=u(se),Je=u(ie),Xe=u(ce),h=u(Re),Ge=u(he),Ke=u(de),Ve=u(je);function Ze(){return Se("nitro-app",{asyncContext:!!globalThis.app.config.server.experimental?.asyncContext,AsyncLocalStorage:we})}function Qe(){return Ze().use().event}const b="Invariant Violation",{setPrototypeOf:Ye=function(e,n){return e.__proto__=n,e}}=Object;class x extends Error{framesToPop=1;name=b;constructor(n=b){super(typeof n=="number"?`${b}: ${n} (see https://github.com/apollographql/invariant-packages)`:n),Ye(this,x.prototype)}}function et(e,n){if(!e)throw new x(n)}const v="solidFetchEvent";function tt(e){return{request:Ve(e),response:ot(e),clientAddress:De(e),locals:{},nativeEvent:e}}function nt(e){return{...e}}function rt(e){if(!e.context[v]){const n=tt(e);e.context[v]=n}return e.context[v]}function A(e,n){for(const[t,s]of n.entries())j(e,t,s)}class st{event;constructor(n){this.event=n}get(n){const t=H(this.event,n);return Array.isArray(t)?t.join(", "):t||null}has(n){return this.get(n)!==null}set(n,t){return Be(this.event,n,t)}delete(n){return Ke(this.event,n)}append(n,t){j(this.event,n,t)}getSetCookie(){const n=H(this.event,"Set-Cookie");return Array.isArray(n)?n:[n]}forEach(n){return Object.entries(y(this.event)).forEach(([t,s])=>n(Array.isArray(s)?s.join(", "):s,t,this))}entries(){return Object.entries(y(this.event)).map(([n,t])=>[n,Array.isArray(t)?t.join(", "):t])[Symbol.iterator]()}keys(){return Object.keys(y(this.event))[Symbol.iterator]()}values(){return Object.values(y(this.event)).map(n=>Array.isArray(n)?n.join(", "):n)[Symbol.iterator]()}[Symbol.iterator](){return this.entries()[Symbol.iterator]()}}function ot(e){return{get status(){return q(e)},set status(n){S(e,n)},get statusText(){return We(e)},set statusText(n){S(e,q(e),n)},headers:new st(e)}}const N=[{page:!0,$component:{src:"src/routes/index.jsx?pick=default&pick=$css",build:()=>import("../index.js"),import:()=>import("../index.js")},path:"/",filePath:"/home/gromov/projects/my/svg-sprites/integration/apps/solid-start-vite/src/routes/index.jsx"}],at=it(N.filter(e=>e.page));function it(e){function n(t,s,o,a){const i=Object.values(t).find(c=>o.startsWith(c.id+"/"));return i?(n(i.children||(i.children=[]),s,o.slice(i.id.length)),t):(t.push({...s,id:o,path:o.replace(/\([^)/]+\)/g,"").replace(/\/+/g,"/")}),t)}return e.sort((t,s)=>t.path.length-s.path.length).reduce((t,s)=>n(t,s,s.path,s.path),[])}function ct(e){return e.$HEAD||e.$GET||e.$POST||e.$PUT||e.$PATCH||e.$DELETE}be({routes:N.reduce((e,n)=>{if(!ct(n))return e;let t=n.path.replace(/\([^)/]+\)/g,"").replace(/\/+/g,"/").replace(/\*([^/]*)/g,(s,o)=>`**:${o}`).split("/").map(s=>s.startsWith(":")||s.startsWith("*")?s:encodeURIComponent(s)).join("/");if(/:[^/]*\?/g.test(t))throw new Error(`Optional parameters are not supported in API routes: ${t}`);if(e[t])throw new Error(`Duplicate API routes for "${t}" found at "${e[t].route.path}" and "${n.path}"`);return e[t]={route:n},e},{})});function ut(e){e.forEach(n=>{if(!n.attrs.href)return;let t=document.head.querySelector(`link[href="${n.attrs.href}"]`);t||(t=document.createElement("link"),t.setAttribute("rel","preload"),t.setAttribute("as","style"),t.setAttribute("href",n.attrs.href),document.head.appendChild(t))})}var lt=" ";const dt={style:e=>R("style",e.attrs,()=>e.children,!0),link:e=>R("link",e.attrs,void 0,!0),script:e=>e.attrs.src?R("script",Q(()=>e.attrs,{get id(){return e.key}}),()=>Y(lt),!0):null,noscript:e=>R("noscript",e.attrs,()=>Z(e.children),!0)};function pt(e,n){let{tag:t,attrs:{key:s,...o}={key:void 0},children:a}=e;return dt[t]({attrs:{...o,nonce:n},key:s,children:a})}function ft(e,n,t,s="default"){return K(async()=>{{const a=(await e.import())[s],c=(await n.inputs?.[e.src].assets()).filter(l=>l.tag==="style"||l.attrs.rel==="stylesheet");return typeof window<"u"&&ut(c),{default:l=>[...c.map(g=>pt(g)),V(a,l)]}}})}function M(){function e(t){return{...t,...t.$$route?t.$$route.require().route:void 0,info:{...t.$$route?t.$$route.require().route.info:{},filesystem:!0},component:t.$component&&ft(t.$component,globalThis.MANIFEST.client,globalThis.MANIFEST.ssr),children:t.children?t.children.map(e):void 0}}return at.map(e)}let C;const Ft=ee?()=>te().routes:()=>C||(C=M());function ht(e){const n=Je(e.nativeEvent,"flash");if(n)try{let t=JSON.parse(n);if(!t||!t.result)return;const s=[...t.input.slice(0,-1),new Map(t.input[t.input.length-1])],o=t.error?new Error(t.result):t.result;return{input:s,url:t.url,pending:!1,result:t.thrown?void 0:o,error:t.thrown?o:void 0}}catch(t){console.error(t)}finally{Xe(e.nativeEvent,"flash","",{maxAge:0})}}async function gt(e){const n=globalThis.MANIFEST.client;return globalThis.MANIFEST.ssr,e.response.headers.set("Content-Type","text/html"),Object.assign(e,{manifest:await n.json(),assets:[...await n.inputs[n.handler].assets()],router:{submission:ht(e)},routes:M(),complete:!1,$islands:new Set})}const mt=new Set([301,302,303,307,308]);function Rt(e){return e.status&&mt.has(e.status)?e.status:302}const yt={},E=[qe,He,Ae,Ce,ke,Pe,Fe,Le,Ie,Oe,Ue],St=64,D=ve.RegExp;function W(e){const n=new TextEncoder().encode(e),t=n.length,s=t.toString(16),o="00000000".substring(0,8-s.length)+s,a=new TextEncoder().encode(`;0x${o};`),i=new Uint8Array(12+t);return i.set(a),i.set(n,12),i}function k(e,n){return new ReadableStream({start(t){Te(n,{scopeId:e,plugins:E,onSerialize(s,o){t.enqueue(W(o?`(${xe(e)},${s})`:s))},onDone(){t.close()},onError(s){t.error(s)}})}})}function wt(e){return new ReadableStream({start(n){Ee(e,{disabledFeatures:D,depthLimit:St,plugins:E,onParse(t){n.enqueue(W(JSON.stringify(t)))},onDone(){n.close()},onError(t){n.error(t)}})}})}async function P(e){return $e(JSON.parse(e),{plugins:E,disabledFeatures:D})}async function bt(e){const n=rt(e),t=n.request,s=t.headers.get("X-Server-Id"),o=t.headers.get("X-Server-Instance"),a=t.headers.has("X-Single-Flight"),i=new URL(t.url);let c,p;if(s)et(typeof s=="string","Invalid server function"),[c,p]=decodeURIComponent(s).split("#");else if(c=i.searchParams.get("id"),p=i.searchParams.get("name"),!c||!p)return new Response(null,{status:404});const l=yt[c];let g;if(!l)return new Response(null,{status:404});g=await l.importer();const B=g[l.functionName];let f=[];if(!o||e.method==="GET"){const r=i.searchParams.get("args");if(r){const d=await P(r);for(const m of d)f.push(m)}}if(e.method==="POST"){const r=t.headers.get("content-type"),d=e.node.req,m=d instanceof ReadableStream,z=d.body instanceof ReadableStream,J=m&&d.locked||z&&d.body.locked,X=m?d:d.body,w=J?t:new Request(t,{...t,body:X});t.headers.get("x-serialized")?f=await P(await w.text()):r?.startsWith("multipart/form-data")||r?.startsWith("application/x-www-form-urlencoded")?f.push(await w.formData()):r?.startsWith("application/json")&&(f=await w.json())}try{let r=await O(n,async()=>(I.context={event:n},n.locals.serverFunctionMeta={id:c+"#"+p},B(...f)));if(a&&o&&(r=await L(n,r)),r instanceof Response){if(r.headers&&r.headers.has("X-Content-Raw"))return r;o&&(r.headers&&A(e,r.headers),r.status&&(r.status<300||r.status>=400)&&S(e,r.status),r.customBody?r=await r.customBody():r.body==null&&(r=null))}if(!o)return F(r,t,f);return h(e,"x-serialized","true"),h(e,"content-type","text/javascript"),k(o,r);return wt(r)}catch(r){if(r instanceof Response)a&&o&&(r=await L(n,r)),r.headers&&A(e,r.headers),r.status&&(!o||r.status<300||r.status>=400)&&S(e,r.status),r.customBody?r=r.customBody():r.body==null&&(r=null),h(e,"X-Error","true");else if(o){const d=r instanceof Error?r.message:typeof r=="string"?r:"true";h(e,"X-Error",d.replace(/[\r\n]+/g,""))}else r=F(r,t,f,!0);return o?(h(e,"x-serialized","true"),h(e,"content-type","text/javascript"),k(o,r)):r}}function F(e,n,t,s){const o=new URL(n.url),a=e instanceof Error;let i=302,c;return e instanceof Response?(c=new Headers(e.headers),e.headers.has("Location")&&(c.set("Location",new URL(e.headers.get("Location"),o.origin+"").toString()),i=Rt(e))):c=new Headers({Location:new URL(n.headers.get("referer")).toString()}),e&&c.append("Set-Cookie",`flash=${encodeURIComponent(JSON.stringify({url:o.pathname+o.search,result:a?e.message:e,thrown:s,error:a,input:[...t.slice(0,-1),[...t[t.length-1].entries()]]}))}; Secure; HttpOnly;`),new Response(null,{status:i,headers:c})}let $;function vt(e){const n=new Headers(e.request.headers),t=ze(e.nativeEvent),s=e.response.headers.getSetCookie();n.delete("cookie");let o=!1;return e.nativeEvent.node?.req&&(o=!0,e.nativeEvent.node.req.headers.cookie=""),s.forEach(a=>{if(!a)return;const{maxAge:i,expires:c,name:p,value:l}=G(a);if(i!=null&&i<=0){delete t[p];return}if(c!=null&&c.getTime()<=Date.now()){delete t[p];return}t[p]=l}),Object.entries(t).forEach(([a,i])=>{n.append("cookie",`${a}=${i}`),o&&(e.nativeEvent.node.req.headers.cookie+=`${a}=${i};`)}),n}async function L(e,n){let t,s=new URL(e.request.headers.get("referer")).toString();n instanceof Response&&(n.headers.has("X-Revalidate")&&(t=n.headers.get("X-Revalidate").split(",")),n.headers.has("Location")&&(s=new URL(n.headers.get("Location"),new URL(e.request.url).origin+"").toString()));const o=nt(e);return o.request=new Request(s,{headers:vt(e)}),await O(o,async()=>{await gt(o),$||($=(await import("./app-Bgr52ZUm.js")).default),o.router.dataOnly=t||!0,o.router.previousUrl=e.request.headers.get("referer");try{ne(()=>{I.context.event=o,$()})}catch(c){console.log(c)}const a=o.router.data;if(!a)return n;let i=!1;for(const c in a)a[c]===void 0?delete a[c]:i=!0;return i&&(n instanceof Response?n.customBody&&(a._$value=n.customBody()):(a._$value=n,n=new Response(null,{status:200})),n.customBody=()=>a,n.headers.set("X-Single-Flight","true")),n})}const Lt=ye(bt);export{Ft as F,Lt as h}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/sprite-DvsqBNon.svg b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/sprite-DvsqBNon.svg deleted file mode 100644 index bd5742e..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/sprite-DvsqBNon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/svg-sprite.manifest-D0DHYqq2.js b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/svg-sprite.manifest-D0DHYqq2.js deleted file mode 100644 index 00c28b5..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/svg-sprite.manifest-D0DHYqq2.js +++ /dev/null @@ -1 +0,0 @@ -import{s as o}from"./index-AIk5O37p.js";import"solid-js/web";import"solid-js";const s={schemaVersion:1,generator:"@gromlab/svg-sprites",name:"icons",usage:{framework:"solid-start",componentName:"IconsIcon",ssr:!0},mode:"solid-start@vite",target:"vite",format:"stack",iconCount:1,spriteUrl:o,icons:[{name:"check",id:"check",viewBox:"0 0 24 24",colors:[{variable:"--icon-color-1",fallback:"currentColor"}]}]};export{s as default,s as spriteManifest}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/viewer-element-BO6fulPI.js b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/viewer-element-BO6fulPI.js deleted file mode 100644 index a96cb71..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/assets/viewer-element-BO6fulPI.js +++ /dev/null @@ -1,602 +0,0 @@ -var Rt=Object.defineProperty,Lt=Object.getOwnPropertyNames,m=(e,t,r)=>function(){if(r)throw r[0];try{return e&&(t=(0,e[Lt(e)[0]])(e=0)),t}catch(o){throw r=[o],o}},it=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},E,u,te=m({"node_modules/vanilla-colorful/lib/utils/math.js"(){E=(e,t=0,r=1)=>e>r?r:eMath.round(r*e)/r}}),ot,Y,st,Pe,Z,He,S,Ue,Ne,re=m({"node_modules/vanilla-colorful/lib/utils/convert.js"(){te(),ot=e=>Ne(Y(e)),Y=e=>(e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?u(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?u(parseInt(e.substring(6,8),16)/255,2):1}),st=e=>Ue(He(e)),Pe=({h:e,s:t,v:r,a:i})=>{const o=(200-t)*r/100;return{h:u(e),s:u(o>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0),l:u(o/2),a:u(i,2)}},Z=e=>{const{h:t,s:r,l:i}=Pe(e);return`hsl(${t}, ${r}%, ${i}%)`},He=({h:e,s:t,v:r,a:i})=>{e=e/360*6,t=t/100,r=r/100;const o=Math.floor(e),s=r*(1-t),a=r*(1-(e-o)*t),n=r*(1-(1-e+o)*t),l=o%6;return{r:u([r,a,s,s,n,r][l]*255),g:u([n,r,r,a,s,s][l]*255),b:u([s,s,n,r,r,a][l]*255),a:u(i,2)}},S=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},Ue=({r:e,g:t,b:r,a:i})=>{const o=i<1?S(u(i*255)):"";return"#"+S(e)+S(t)+S(r)+o},Ne=({r:e,g:t,b:r,a:i})=>{const o=Math.max(e,t,r),s=o-Math.min(e,t,r),a=s?o===e?(t-r)/s:o===t?2+(r-e)/s:4+(e-t)/s:0;return{h:u(60*(a<0?a+6:a)),s:u(o?s/o*100:0),v:u(o/255*100),a:i}}}}),$e,at,nt=m({"node_modules/vanilla-colorful/lib/utils/compare.js"(){re(),$e=(e,t)=>{if(e===t)return!0;for(const r in e)if(e[r]!==t[r])return!1;return!0},at=(e,t)=>e.toLowerCase()===t.toLowerCase()?!0:$e(Y(e),Y(t))}}),ae,ie,X,Ae=m({"node_modules/vanilla-colorful/lib/utils/dom.js"(){ae={},ie=e=>{let t=ae[e];return t||(t=document.createElement("template"),t.innerHTML=e,ae[e]=t),t},X=(e,t,r)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}}}),w,z,De,ne,Re,Ee,lt=m({"node_modules/vanilla-colorful/lib/components/slider.js"(){Ae(),te(),w=!1,z=e=>"touches"in e,De=e=>w&&!z(e)?!1:(w||(w=z(e)),!0),ne=(e,t)=>{const r=z(t)?t.touches[0]:t,i=e.el.getBoundingClientRect();X(e.el,"move",e.getMove({x:E((r.pageX-(i.left+window.pageXOffset))/i.width),y:E((r.pageY-(i.top+window.pageYOffset))/i.height)}))},Re=(e,t)=>{const r=t.keyCode;r>40||e.xy&&r<37||r<33||(t.preventDefault(),X(e.el,"move",e.getMove({x:r===39?.01:r===37?-.01:r===34?.05:r===33?-.05:r===35?1:r===36?-1:0,y:r===40?.01:r===38?-.01:0},!0)))},Ee=class{constructor(e,t,r,i){const o=ie(`
`);e.appendChild(o.content.cloneNode(!0));const s=e.querySelector(`[part=${t}]`);s.addEventListener("mousedown",this),s.addEventListener("touchstart",this),s.addEventListener("keydown",this),this.el=s,this.xy=i,this.nodes=[s.firstChild,s]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(w?"touchmove":"mousemove",this),t(w?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!De(e)||!w&&e.button!=0)return;this.el.focus(),ne(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),ne(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":Re(this,e);break}}style(e){e.forEach((t,r)=>{for(const i in t)this.nodes[r].style.setProperty(i,t[i])})}}}}),ct,jt=m({"node_modules/vanilla-colorful/lib/components/hue.js"(){lt(),re(),te(),ct=class extends Ee{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:`${e/360*100}%`,color:Z({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${u(e)}`)}getMove(e,t){return{h:t?E(this.h+e.x*360,0,360):360*e.x}}}}}),dt,zt=m({"node_modules/vanilla-colorful/lib/components/saturation.js"(){lt(),re(),te(),dt=class extends Ee{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:`${100-e.v}%`,left:`${e.s}%`,color:Z(e)},{"background-color":Z({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${u(e.s)}%, Brightness ${u(e.v)}%`)}getMove(e,t){return{s:t?E(this.hsva.s+e.x*100,0,100):e.x*100,v:t?E(this.hsva.v-e.y*100,0,100):Math.round(100-e.y*100)}}}}}),ht,Bt=m({"node_modules/vanilla-colorful/lib/styles/color-picker.js"(){ht=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}'}}),pt,It=m({"node_modules/vanilla-colorful/lib/styles/hue.js"(){pt="[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}"}}),ut,Vt=m({"node_modules/vanilla-colorful/lib/styles/saturation.js"(){ut="[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"}}),T,B,le,I,ce,de,he,gt,qt=m({"node_modules/vanilla-colorful/lib/components/color-picker.js"(){nt(),Ae(),jt(),zt(),Bt(),It(),Vt(),T=Symbol("same"),B=Symbol("color"),le=Symbol("hsva"),I=Symbol("update"),ce=Symbol("parts"),de=Symbol("css"),he=Symbol("sliders"),gt=class extends HTMLElement{static get observedAttributes(){return["color"]}get[de](){return[ht,pt,ut]}get[he](){return[dt,ct]}get color(){return this[B]}set color(e){if(!this[T](e)){const t=this.colorModel.toHsva(e);this[I](t),this[B]=e}}constructor(){super();const e=ie(``),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[ce]=this[he].map(r=>new r(t))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,r){const i=this.colorModel.fromAttr(r);this[T](i)||(this.color=i)}handleEvent(e){const t=this[le],r={...t,...e.detail};this[I](r);let i;!$e(r,t)&&!this[T](i=this.colorModel.fromHsva(r))&&(this[B]=i,X(this,"color-changed",{value:i}))}[T](e){return this.color&&this.colorModel.equal(e,this.color)}[I](e){this[le]=e,this[ce].forEach(t=>t.update(e))}}}}),mt={};it(mt,{HexBase:()=>vt});var Le,vt,Ft=m({"node_modules/vanilla-colorful/lib/entrypoints/hex.js"(){qt(),re(),nt(),Le={defaultColor:"#000",toHsva:ot,fromHsva:({h:e,s:t,v:r})=>st({h:e,s:t,v:r,a:1}),equal:at,fromAttr:e=>e},vt=class extends gt{get colorModel(){return Le}}}}),je,G,Jt=m({"node_modules/vanilla-colorful/lib/utils/validate.js"(){je=/^#?([0-9A-F]{3,8})$/i,G=(e,t)=>{const r=je.exec(e),i=r?r[1].length:0;return i===3||i===6||!!t&&i===4||!!t&&i===8}}}),_t={};it(_t,{HexInputBase:()=>ft});var ze,pe,ue,M,ge,V,q,me,C,ft,Wt=m({"node_modules/vanilla-colorful/lib/entrypoints/hex-input.js"(){Jt(),Ae(),ze=ie(''),pe=(e,t)=>e.replace(/([^0-9A-F]+)/gi,"").substring(0,t?8:6),ue=Symbol("alpha"),M=Symbol("color"),ge=Symbol("saved"),V=Symbol("input"),q=Symbol("init"),me=Symbol("prefix"),C=Symbol("update"),ft=class extends HTMLElement{static get observedAttributes(){return["alpha","color","prefixed"]}get color(){return this[M]}set color(e){this[M]=e,this[C](e)}get alpha(){return this[ue]}set alpha(e){this[ue]=e,this.toggleAttribute("alpha",e);const t=this.color;t&&!G(t,e)&&(this.color=t.startsWith("#")?t.substring(0,t.length===5?4:7):t.substring(0,t.length===4?3:6))}get prefixed(){return this[me]}set prefixed(e){this[me]=e,this.toggleAttribute("prefixed",e),this[C](this.color)}constructor(){super();const e=this.attachShadow({mode:"open"});e.appendChild(ze.content.cloneNode(!0)),e.firstElementChild.addEventListener("slotchange",()=>this[q](e))}connectedCallback(){if(this[q](this.shadowRoot),this.hasOwnProperty("alpha")){const e=this.alpha;delete this.alpha,this.alpha=e}else this.alpha=this.hasAttribute("alpha");if(this.hasOwnProperty("prefixed")){const e=this.prefixed;delete this.prefixed,this.prefixed=e}else this.prefixed=this.hasAttribute("prefixed");if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color==null?this.color=this.getAttribute("color")||"":this[M]&&this[C](this[M])}handleEvent(e){const t=e.target,{value:r}=t;switch(e.type){case"input":const i=pe(r,this.alpha);this[ge]=this.color,(G(i,this.alpha)||r==="")&&(this.color=i,this.dispatchEvent(new CustomEvent("color-changed",{bubbles:!0,detail:{value:i?"#"+i:""}})));break;case"blur":r&&!G(r,this.alpha)&&(this.color=this[ge])}}attributeChangedCallback(e,t,r){e==="color"&&this.color!==r&&(this.color=r);const i=r!=null;e==="alpha"&&this.alpha!==i&&(this.alpha=i),e==="prefixed"&&this.prefixed!==i&&(this.prefixed=i)}[q](e){let t=this.querySelector("input");if(!t){let r;for(;r=this.firstChild;)r.remove();t=e.querySelector("input")}t.addEventListener("input",this),t.addEventListener("blur",this),this[V]=t,this[C](this.color)}[C](e){this[V]&&(this[V].value=e==null||e==""?"":(this.prefixed?"#":"")+pe(e,this.alpha))}}}}),K=globalThis,ke=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bt=Symbol(),Be=new WeakMap,Gt=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==bt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(ke&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Be.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Be.set(t,e))}return e}toString(){return this.cssText}},wt=e=>new Gt(typeof e=="string"?e:e+"",void 0,bt),Kt=(e,t)=>{if(ke)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of t){const i=document.createElement("style"),o=K.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=r.cssText,e.appendChild(i)}},Ie=ke?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const i of t.cssRules)r+=i.cssText;return wt(r)})(e):e,{is:Yt,defineProperty:Zt,getOwnPropertyDescriptor:Xt,getOwnPropertyNames:Qt,getOwnPropertySymbols:er,getPrototypeOf:tr}=Object,oe=globalThis,Ve=oe.trustedTypes,rr=Ve?Ve.emptyScript:"",ir=oe.reactiveElementPolyfillSupport,H=(e,t)=>e,xe={toAttribute(e,t){switch(t){case Boolean:e=e?rr:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},$t=(e,t)=>!Yt(e,t),qe={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:$t};Symbol.metadata??=Symbol("metadata"),oe.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=qe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&Zt(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){const{get:i,set:o}=Xt(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:i,set(s){const a=i?.call(this);o?.call(this,s),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qe}static _$Ei(){if(this.hasOwnProperty(H("elementProperties")))return;const e=tr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(H("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(H("properties"))){const t=this.properties,r=[...Qt(t),...er(t)];for(const i of r)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,i]of t)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)t.unshift(Ie(i))}else e!==void 0&&t.push(Ie(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Kt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const o=(r.converter?.toAttribute!==void 0?r.converter:xe).toAttribute(t,r.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:xe;this._$Em=i;const a=s.fromAttribute(t,o.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(e,t,r,i=!1,o){if(e!==void 0){const s=this.constructor;if(i===!1&&(o=this[e]),r??=s.getPropertyOptions(e),!((r.hasChanged??$t)(o,t)||r.useDefault&&r.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:i,wrapped:o},s){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),o!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,o]of r){const{wrapped:s}=o,a=this[i];s!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,o,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[H("elementProperties")]=new Map,A[H("finalized")]=new Map,ir?.({ReactiveElement:A}),(oe.reactiveElementVersions??=[]).push("2.1.2");var Se=globalThis,Fe=e=>e,Q=Se.trustedTypes,Je=Q?Q.createPolicy("lit-html",{createHTML:e=>e}):void 0,xt="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,yt="?"+f,or=`<${yt}>`,y=document,N=()=>y.createComment(""),D=e=>e===null||typeof e!="object"&&typeof e!="function",Te=Array.isArray,sr=e=>Te(e)||typeof e?.[Symbol.iterator]=="function",ve=`[ -\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,We=/-->/g,Ge=/>/g,$=RegExp(`>|${ve}(?:([^\\s"'>=/]+)(${ve}*=${ve}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),Ke=/'/g,Ye=/"/g,Ct=/^(?:script|style|textarea|title)$/i,ar=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),p=ar(1),b=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Ze=new WeakMap,x=y.createTreeWalker(y,129);function At(e,t){if(!Te(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Je!==void 0?Je.createHTML(t):t}var nr=(e,t)=>{const r=e.length-1,i=[];let o,s=t===2?"":t===3?"":"",a=O;for(let n=0;n"?(a=o??O,h=-1):d[1]===void 0?h=-2:(h=a.lastIndex-d[2].length,g=d[1],a=d[3]===void 0?$:d[3]==='"'?Ye:Ke):a===Ye||a===Ke?a=$:a===We||a===Ge?a=O:(a=$,o=void 0);const _=a===$&&e[n+1].startsWith("/>")?" ":"";s+=a===O?l+or:h>=0?(i.push(g),l.slice(0,h)+xt+l.slice(h)+f+_):l+f+(h===-2?n:_)}return[At(e,s+(e[r]||"")+(t===2?"":t===3?"":"")),i]},ye=class Et{constructor({strings:t,_$litType$:r},i){let o;this.parts=[];let s=0,a=0;const n=t.length-1,l=this.parts,[g,d]=nr(t,r);if(this.el=Et.createElement(g,i),x.currentNode=this.el.content,r===2||r===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=x.nextNode())!==null&&l.length0){o.textContent=Q?Q.emptyScript:"";for(let _=0;_2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(e,t=this,r,i){const o=this.strings;let s=!1;if(o===void 0)e=k(this,e,t,0),s=!D(e)||e!==this._$AH&&e!==b,s&&(this._$AH=e);else{const a=e;let n,l;for(e=o[0],n=0;n{const i=r?.renderBefore??t;let o=i._$litPart$;if(o===void 0){const s=r?.renderBefore??null;i._$litPart$=o=new Me(t.insertBefore(N(),s),s,void 0,r??{})}return o._$AI(e),o},Oe=globalThis,U=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=gr(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return b}};U._$litElement$=!0,U.finalized=!0,Oe.litElementHydrateSupport?.({LitElement:U});var mr=Oe.litElementPolyfillSupport;mr?.({LitElement:U});(Oe.litElementVersions??=[]).push("4.2.2");var F=e=>e??c,St={ATTRIBUTE:1,CHILD:2},Tt=e=>(...t)=>({_$litDirective$:e,values:t}),Mt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},Ot="important",vr=" !"+Ot,_e=Tt(class extends Mt{constructor(e){if(super(e),e.type!==St.ATTRIBUTE||e.name!=="style"||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const i=e[r];return i==null?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){const{style:r}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?r.removeProperty(i):r[i]=null);for(const i in t){const o=t[i];if(o!=null){this.ft.add(i);const s=typeof o=="string"&&o.endsWith(vr);i.includes("-")||s?r.setProperty(i,s?o.slice(0,-11):o,s?Ot:""):r[i]=o}}return b}}),Ce=class extends Mt{constructor(e){if(super(e),this.it=c,e.type!==St.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===c||e==null)return this._t=void 0,this.it=e;if(e===b)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Ce.directiveName="unsafeHTML",Ce.resultType=1;var _r=Tt(Ce),fr=[{id:"svg",label:"SVG"},{id:"img",label:"IMG"},{id:"css",label:"CSS"}],br={react:"React",vue:"Vue",svelte:"Svelte",angular:"Angular",astro:"Astro",solid:"Solid","solid-start":"SolidStart",preact:"Preact",qwik:"Qwik",lit:"Lit",alpine:"Alpine"};function Pt(e){return e.usage?e.usage:e.componentName?{framework:"react",componentName:e.componentName}:null}function fe(e){const t=Pt(e),i=[...t?[{id:t.framework,label:br[t.framework]}]:[],...fr];return e.format==="stack"?i:i.filter(o=>o.id!=="img"&&o.id!=="css")}function wr(e){if(!e)return null;const t=e.trim().split(/[\s,]+/).map(Number);return t.length===4&&t.every(Number.isFinite)?`${t[2]} × ${t[3]}`:null}function R(e,t="#1a1a1a"){const r=e.trim().toLowerCase();if(r==="currentcolor")return R(t);const i=r.match(/^#([\da-f])([\da-f])([\da-f])(?:[\da-f])?$/i);if(i)return`#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}`;const o=r.match(/^#([\da-f]{6})(?:[\da-f]{2})?$/i);if(o)return`#${o[1]}`;const s=r.match(/^rgba?\(\s*(\d+)\s*[, ]\s*(\d+)\s*[, ]\s*(\d+)/);return s?`#${s.slice(1,4).map(n=>Math.min(255,Number(n)).toString(16).padStart(2,"0")).join("")}`:{black:"#000000",blue:"#0000ff",cyan:"#00ffff",gray:"#808080",green:"#008000",grey:"#808080",magenta:"#ff00ff",orange:"#ffa500",pink:"#ffc0cb",purple:"#800080",red:"#ff0000",white:"#ffffff",yellow:"#ffff00"}[r]??R(t===e?"#1a1a1a":t)}function $r(e){return Object.entries(e).map(([t,r])=>` ${JSON.stringify(t)}: ${JSON.stringify(r)},`)}function P(e){const t={"&":"&",'"':""","<":"<",">":">"};return e.replace(/[&"<>]/g,r=>t[r])}function xr(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function yr(e){const{manifest:t,icon:r,tab:i,colorOverrides:o,cssColor:s}=e,a=`${t.spriteUrl}#${r.id}`,n=$r(o);if(!["svg","img","css"].includes(i)){const d=Pt(t);if(!d)throw new Error(`The ${i} code tab requires component metadata.`);if(d.framework==="alpine")return{code:``,language:"html"};if(d.framework==="lit")return{code:`<${d.tagName} icon=${JSON.stringify(r.name)}>`,language:"html"};if(d.framework==="angular")return{code:`<${d.selector} icon=${JSON.stringify(r.name)}>`,language:"html"};if(d.framework==="vue"){const h=Object.entries(o).map(([v,_])=>`${JSON.stringify(v)}: ${JSON.stringify(_)}`).join(", ");return{code:`<${d.componentName} icon=${JSON.stringify(r.name)}${h?` :style="{ ${P(h)} }"`:""} />`,language:"html"}}return n.length===0?{code:`<${d.componentName} icon=${JSON.stringify(r.name)} />`,language:"tsx"}:{code:[`<${d.componentName}`,` icon=${JSON.stringify(r.name)}`," style={{",...n," }}","/>"].join(` -`),language:"tsx"}}if(i==="svg"){const d=Object.entries(o).map(([h,v])=>`${h}: ${v}`).join("; ");return{code:` - -`,language:"html"}}if(i==="img")return{code:`${P(r.name)}`,language:"html"};const l=`icon-${r.name.replace(/[^a-zA-Z0-9_-]+/g,"-")||"sprite"}`,g=xr(a);return{code:[`.${l} {`," width: 24px;"," height: 24px;",` mask: url('${g}') no-repeat center / contain;`,` -webkit-mask: url('${g}') no-repeat center / contain;`,` background-color: ${s};`,"}"].join(` -`),language:"css"}}var Cr=/[&<>"]/g,Ar={"&":"&","<":"<",">":">",'"':"""},Er=[[//g,"comment"],[/<\/?[\w.-]+/g,"tag"],[/[\w-]+(?=\s*=)/g,"attr"],[/"[^"]*"|'[^']*'/g,"string"]],kr=[[/\/\*[\s\S]*?\*\//g,"comment"],[/\.[\w-]+/g,"selector"],[/[\w-]+(?=\s*:)/g,"property"],[/'[^']*'|"[^"]*"/g,"string"],[/#[\da-fA-F]{3,8}\b/g,"color"],[/\d+(?:\.\d+)?(?:px|em|rem|%)?/g,"number"]];function Sr(e,t){const r=t==="css"?kr:Er,i=[];let o=0;for(;o{const n=a.replace(Cr,l=>Ar[l]);return s?`${n}`:n}).join("")}var J=new WeakMap;function L(e){return e!==null&&typeof e=="object"}function Ht(e){return L(e)?typeof e.name=="string"&&typeof e.id=="string"&&(e.viewBox===null||typeof e.viewBox=="string")&&Array.isArray(e.colors):!1}function Ut(e){return L(e)?e.schemaVersion===1&&e.generator==="@gromlab/svg-sprites"&&typeof e.name=="string"&&typeof e.target=="string"&&(e.format==="stack"||e.format==="symbol")&&typeof e.iconCount=="number"&&typeof e.spriteUrl=="string"&&Array.isArray(e.icons)&&e.icons.every(Ht):!1}function Nt(e){return L(e)&&e.schemaVersion===1&&e.generator==="@gromlab/svg-sprites"&&typeof e.name=="string"&&typeof e.target=="string"&&(e.format==="stack"||e.format==="symbol")&&typeof e.iconCount=="number"&&Array.isArray(e.icons)&&e.icons.every(Ht)}function Tr(e){return!L(e)||Ut(e)||Nt(e)?e:e.default??e.spriteManifest??e}function ee(e,t){const r=Tr(e);if(Ut(r))return r;if(t&&Nt(r))return{...r,spriteUrl:t};throw new Error("The loaded source does not contain a valid SVG sprite manifest.")}function Xe(e){return Array.isArray(e)?e:Object.values(e)}function Dt(e){if(!L(e))return!1;const t=e;return typeof t.manifestUrl=="string"&&typeof t.spriteUrl=="string"}function Qe(e,t){return e.namet.name?1:0}async function Mr(e){const t=await fetch(e.manifestUrl);if(!t.ok)throw new Error(`Cannot load SVG sprite manifest: ${t.status} ${t.statusText}`);return ee(await t.json(),e.spriteUrl)}async function Or(e){if(Dt(e))return Mr(e);if(typeof e!="function")return ee(e);const t=J.get(e);if(t)return t;const r=Promise.resolve().then(e).then(i=>ee(i));return J.set(e,r),r.catch(()=>{J.get(e)===r&&J.delete(e)}),r}var Pr=` -:host { display: block; } -.gromlab-sprite-viewer { - --sv-bg: #f0f0f3; - --sv-text: #1a1a1a; - --sv-card: #ffffff; - --sv-card-hover: #eaeaed; - --sv-border: #d8d8d8; - --sv-accent: #3b82f6; - --sv-muted: #777777; - --sv-code: #f5f5f5; - --sv-checker-a: #e9e9e9; - --sv-checker-b: #ffffff; - --sv-danger: #b42332; - box-sizing: border-box; - min-height: 320px; - padding: 24px; - color: var(--sv-text); - color-scheme: light; - background: var(--sv-bg); - border-radius: 12px; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -} -.gromlab-sprite-viewer[data-theme="dark"] { - --sv-bg: #1a1a1a; - --sv-text: #e5e5e5; - --sv-card: #2a2a2a; - --sv-card-hover: #333333; - --sv-border: #404040; - --sv-muted: #a3a3a3; - --sv-code: #242424; - --sv-checker-a: #333333; - --sv-checker-b: #2a2a2a; - --sv-danger: #ff9ba6; - color-scheme: dark; -} -@media (prefers-color-scheme: dark) { - .gromlab-sprite-viewer:not([data-theme]) { - --sv-bg: #1a1a1a; - --sv-text: #e5e5e5; - --sv-card: #2a2a2a; - --sv-card-hover: #333333; - --sv-border: #404040; - --sv-muted: #a3a3a3; - --sv-code: #242424; - --sv-checker-a: #333333; - --sv-checker-b: #2a2a2a; - --sv-danger: #ff9ba6; - color-scheme: dark; - } -} -.gromlab-sprite-viewer *, -.gromlab-sprite-viewer *::before, -.gromlab-sprite-viewer *::after { box-sizing: border-box; } -.gromlab-sprite-viewer button, -.gromlab-sprite-viewer input { font: inherit; } -.gromlab-sprite-viewer__header { - display: flex; - align-items: center; - gap: 16px; - flex-wrap: wrap; - margin-bottom: 24px; -} -.gromlab-sprite-viewer__title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; } -.gromlab-sprite-viewer__summary { color: var(--sv-muted); font-size: 13px; } -.gromlab-sprite-viewer__toolbar { display: flex; align-items: center; gap: 12px; margin-left: auto; } -.gromlab-sprite-viewer__search { - width: 220px; - height: 38px; - padding: 0 12px; - color: var(--sv-text); - background: var(--sv-card); - border: 1px solid var(--sv-border); - border-radius: 8px; - outline: none; - transition: border-color .15s, box-shadow .15s; -} -.gromlab-sprite-viewer__search:focus { border-color: var(--sv-accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); } -.gromlab-sprite-viewer__search::placeholder { color: var(--sv-muted); } -.gromlab-sprite-viewer__theme { - display: grid; - place-items: center; - width: 38px; - height: 38px; - padding: 0; - color: var(--sv-text); - background: var(--sv-card); - border: 1px solid var(--sv-border); - border-radius: 8px; - cursor: pointer; - transition: background .15s, border-color .15s; -} -.gromlab-sprite-viewer__theme:hover { background: var(--sv-card-hover); } -.gromlab-sprite-viewer__theme:focus-visible, -.gromlab-sprite-viewer__card:focus-visible, -.gromlab-sprite-viewer__close:focus-visible, -.gromlab-sprite-viewer__tab:focus-visible, -.gromlab-sprite-viewer__copy:focus-visible, -.gromlab-sprite-viewer__swatch:focus-visible { - outline: 2px solid var(--sv-accent); - outline-offset: 2px; -} -.gromlab-sprite-viewer__errors { - margin: 0 0 24px; - padding: 12px 14px; - color: var(--sv-danger); - background: rgba(180, 35, 50, .08); - border: 1px solid rgba(180, 35, 50, .28); - border-radius: 8px; - font-size: 12px; -} -.gromlab-sprite-viewer__group { margin-bottom: 40px; } -.gromlab-sprite-viewer__group-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } -.gromlab-sprite-viewer__group-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; } -.gromlab-sprite-viewer__badge { - padding: 2px 8px; - color: #ffffff; - background: var(--sv-accent); - border-radius: 999px; - font-size: 11px; - line-height: 1.5; - font-weight: 600; - letter-spacing: .04em; - text-transform: uppercase; -} -.gromlab-sprite-viewer__group-count, -.gromlab-sprite-viewer__description { color: var(--sv-muted); font-size: 13px; font-weight: 400; } -.gromlab-sprite-viewer__description { flex-basis: 100%; margin: -2px 0 0; } -.gromlab-sprite-viewer__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; } -.gromlab-sprite-viewer__card { - display: flex; - min-width: 0; - padding: 16px 8px; - color: inherit; - text-align: center; - background: var(--sv-card); - border: 0; - border-radius: 8px; - cursor: pointer; - flex-direction: column; - align-items: center; - gap: 8px; - transition: background .15s, transform .15s; -} -.gromlab-sprite-viewer__card:hover { background: var(--sv-card-hover); transform: translateY(-1px); } -.gromlab-sprite-viewer__icon-wrap, -.gromlab-sprite-viewer__dialog-preview-canvas { - display: grid; - place-items: center; - background: conic-gradient( - var(--sv-checker-a) 25%, var(--sv-checker-b) 0 50%, - var(--sv-checker-a) 0 75%, var(--sv-checker-b) 0 - ); - background-size: 8px 8px; - border-radius: 4px; -} -.gromlab-sprite-viewer__icon-wrap { width: 128px; height: 128px; } -.gromlab-sprite-viewer__icon { display: block; width: 128px; height: 128px; color: var(--sv-text); overflow: visible; } -.gromlab-sprite-viewer__icon-name { - max-width: 100%; - overflow: hidden; - color: var(--sv-muted); - font-size: 13px; - line-height: 1.35; - text-overflow: ellipsis; - white-space: nowrap; -} -.gromlab-sprite-viewer__status { - padding: 40px 20px; - color: var(--sv-muted); - text-align: center; - background: var(--sv-card); - border: 1px dashed var(--sv-border); - border-radius: 8px; -} -.gromlab-sprite-viewer__footer { - display: flex; - align-items: center; - justify-content: center; - gap: 12px; - margin-top: 40px; - padding-top: 16px; - color: var(--sv-muted); - border-top: 1px solid var(--sv-border); - font-size: 13px; -} -.gromlab-sprite-viewer__footer a { color: var(--sv-accent); text-decoration: none; } -.gromlab-sprite-viewer__footer a:hover { text-decoration: underline; } -.gromlab-sprite-viewer__dialog { - width: min(560px, calc(100vw - 32px)); - max-width: none; - max-height: calc(100dvh - 48px); - padding: 0; - color: var(--sv-text); - background: transparent; - border: 0; - overflow: visible; -} -.gromlab-sprite-viewer__dialog::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); } -.gromlab-sprite-viewer__dialog-shell { - position: relative; - max-height: calc(100dvh - 48px); - padding: 24px; - overflow-y: auto; - color: var(--sv-text); - background: var(--sv-bg); - border: 1px solid var(--sv-border); - border-radius: 12px; - box-shadow: 0 24px 72px rgba(0, 0, 0, .28); -} -.gromlab-sprite-viewer__close { - position: absolute; - z-index: 2; - top: 12px; - right: 12px; - display: grid; - place-items: center; - width: 34px; - height: 34px; - padding: 0; - color: var(--sv-text); - background: var(--sv-bg); - border: 1px solid var(--sv-border); - border-radius: 8px; - cursor: pointer; -} -.gromlab-sprite-viewer__close:hover { background: var(--sv-card-hover); } -.gromlab-sprite-viewer__dialog-preview { display: flex; align-items: center; justify-content: center; padding: 24px; margin-bottom: 16px; background: var(--sv-card); border-radius: 8px; } -.gromlab-sprite-viewer__dialog-preview-canvas { width: 256px; height: 256px; } -.gromlab-sprite-viewer__dialog-icon, -.gromlab-sprite-viewer__dialog-img, -.gromlab-sprite-viewer__dialog-mask { display: block; width: 256px; height: 256px; } -.gromlab-sprite-viewer__dialog-icon { color: var(--sv-text); overflow: visible; } -.gromlab-sprite-viewer__dialog-img { object-fit: contain; } -.gromlab-sprite-viewer__dialog-heading { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; } -.gromlab-sprite-viewer__dialog-title { margin: 0; font: 600 16px/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__viewbox { - padding: 2px 8px; - color: var(--sv-muted); - background: var(--sv-card); - border: 1px solid var(--sv-border); - border-radius: 999px; - font-size: 11px; - white-space: nowrap; -} -.gromlab-sprite-viewer__dialog-meta { margin: 0 0 20px; color: var(--sv-muted); text-align: center; font-size: 12px; } -.gromlab-sprite-viewer__colors { margin-bottom: 20px; } -.gromlab-sprite-viewer__hint { - margin: 0 0 12px; - padding: 8px 12px; - color: var(--sv-muted); - background: var(--sv-card); - border-left: 3px solid var(--sv-accent); - border-radius: 4px; - font-size: 12px; - line-height: 1.5; -} -.gromlab-sprite-viewer__colors-title { margin: 0 0 8px; color: var(--sv-muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; } -.gromlab-sprite-viewer__color-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: 32px; margin-bottom: 6px; } -.gromlab-sprite-viewer__swatch { width: 26px; height: 26px; flex: 0 0 auto; padding: 0; border: 1px solid var(--sv-border); border-radius: 4px; cursor: pointer; } -.gromlab-sprite-viewer__color-label { min-width: 0; overflow-wrap: anywhere; color: var(--sv-muted); font: 12px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__color-popover { - position: absolute; - z-index: 5; - bottom: calc(100% + 6px); - left: 0; - width: 224px; - max-width: calc(100vw - 64px); - padding: 12px; - background: var(--sv-bg); - border: 1px solid var(--sv-border); - border-radius: 8px; - box-shadow: 0 8px 28px rgba(0, 0, 0, .22); -} -.gromlab-sprite-viewer__color-picker { display: flex; flex-direction: column; width: 198px; max-width: 100%; height: 160px; } -.gromlab-sprite-viewer__hex-input { display: block; width: 100%; margin-top: 8px; } -.gromlab-sprite-viewer__hex-input::part(input) { box-sizing: border-box; display: block; width: 100%; height: 32px; padding: 0 8px; color: var(--sv-text); text-align: center; background: var(--sv-card); border: 1px solid var(--sv-border); border-radius: 4px; outline: none; font: 12px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__hex-input::part(input):focus { border-color: var(--sv-accent); } -.gromlab-sprite-viewer__tabs { display: flex; overflow-x: auto; margin-bottom: 12px; border-bottom: 1px solid var(--sv-border); } -.gromlab-sprite-viewer__tab { flex: 0 0 auto; padding: 8px 16px; color: var(--sv-muted); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 12px; font-weight: 600; } -.gromlab-sprite-viewer__tab[aria-selected="true"] { color: var(--sv-accent); border-bottom-color: var(--sv-accent); } -.gromlab-sprite-viewer__code { position: relative; overflow: hidden; background: var(--sv-code); border-radius: 8px; } -.gromlab-sprite-viewer__code pre { min-height: 72px; margin: 0; padding: 16px 70px 16px 16px; overflow-x: auto; font: 12px/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__copy { position: absolute; top: 8px; right: 8px; padding: 4px 8px; color: var(--sv-muted); background: var(--sv-bg); border: 1px solid var(--sv-border); border-radius: 4px; cursor: pointer; font-size: 11px; } -.gromlab-sprite-viewer__copy:hover { color: var(--sv-text); } -.gromlab-sprite-viewer__code .hl-tag { color: #116329; } -.gromlab-sprite-viewer__code .hl-attr, -.gromlab-sprite-viewer__code .hl-number, -.gromlab-sprite-viewer__code .hl-property { color: #0550ae; } -.gromlab-sprite-viewer__code .hl-string, -.gromlab-sprite-viewer__code .hl-color { color: #0a3069; } -.gromlab-sprite-viewer__code .hl-comment { color: #8b949e; } -.gromlab-sprite-viewer__code .hl-punctuation, -.gromlab-sprite-viewer__code .hl-selector { color: #6639ba; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-tag { color: #7ee787; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-attr, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-number, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-property { color: #79c0ff; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-string, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-color { color: #a5d6ff; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-punctuation, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-selector { color: #d2a8ff; } -@media (prefers-color-scheme: dark) { - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-tag { color: #7ee787; } - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-attr, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-number, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-property { color: #79c0ff; } - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-string, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-color { color: #a5d6ff; } - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-punctuation, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-selector { color: #d2a8ff; } -} -@media (max-width: 640px) { - .gromlab-sprite-viewer { padding: 16px; border-radius: 8px; } - .gromlab-sprite-viewer__header { align-items: stretch; } - .gromlab-sprite-viewer__toolbar { width: 100%; margin-left: 0; } - .gromlab-sprite-viewer__search { width: auto; flex: 1; min-width: 0; } - .gromlab-sprite-viewer__grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; } - .gromlab-sprite-viewer__icon-wrap, - .gromlab-sprite-viewer__icon { width: 104px; height: 104px; } - .gromlab-sprite-viewer__dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); } - .gromlab-sprite-viewer__dialog-shell { max-height: calc(100dvh - 20px); padding: 16px; } - .gromlab-sprite-viewer__dialog-preview { padding: 16px; } - .gromlab-sprite-viewer__dialog-preview-canvas, - .gromlab-sprite-viewer__dialog-icon, - .gromlab-sprite-viewer__dialog-img, - .gromlab-sprite-viewer__dialog-mask { width: min(256px, calc(100vw - 86px)); height: min(256px, calc(100vw - 86px)); } -} -@media (prefers-reduced-motion: reduce) { - .gromlab-sprite-viewer *, - .gromlab-sprite-viewer *::before, - .gromlab-sprite-viewer *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } -} -`,et="gromlab-sprite-viewer",be="gromlab-hex-color-picker",we="gromlab-hex-input",W;function Hr(){return customElements.get(be)&&customElements.get(we)?Promise.resolve():W||(W=Promise.all([Promise.resolve().then(()=>(Ft(),mt)),Promise.resolve().then(()=>(Wt(),_t))]).then(([{HexBase:e},{HexInputBase:t}])=>{customElements.get(be)||customElements.define(be,class extends e{}),customElements.get(we)||customElements.define(we,class extends t{})}),W)}function tt(e,t){const r=e%100,i=e%10,o=r>=11&&r<=19?t[2]:i===1?t[0]:i>=2&&i<=4?t[1]:t[2];return`${e} ${o}`}function Ur(){return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function rt(e,t){return Object.fromEntries(e.colors.map(({variable:r,fallback:i})=>[r,R(i,t)]))}var Nr=class extends U{static properties={sources:{attribute:!1},viewerTitle:{attribute:"viewer-title"},colorTheme:{attribute:"color-theme"},themeControlled:{attribute:!1},showThemeToggle:{attribute:!1},manifestUrl:{attribute:"manifest-url"},spriteUrl:{attribute:"sprite-url"},_manifests:{state:!0},_errors:{state:!0},_loading:{state:!0},_query:{state:!0},_systemTheme:{state:!0},_selected:{state:!0},_activeTab:{state:!0},_colors:{state:!0},_colorOverrides:{state:!0},_cssColor:{state:!0},_cssColorOverridden:{state:!0},_openColorControl:{state:!0},_copied:{state:!0}};static styles=wt(Pr);_loadVersion=0;_copyTimeout;_media;constructor(){super(),this.sources=[],this.viewerTitle="SVG Sprites",this.colorTheme="auto",this.themeControlled=!1,this.showThemeToggle=!0,this._manifests=[],this._errors=[],this._loading=!1,this._query="",this._systemTheme=Ur(),this._selected=null,this._activeTab="svg",this._colors={},this._colorOverrides={},this._cssColor="#1a1a1a",this._cssColorOverridden=!1,this._openColorControl=null,this._copied=!1}_handleMediaChange=()=>{this._systemTheme=this._media?.matches?"dark":"light",this._syncThemeColors()};_handleDocumentPointerDown=e=>{if(!this._openColorControl)return;e.composedPath().some(r=>r instanceof HTMLElement&&(r.dataset.colorTrigger===this._openColorControl||r.dataset.colorPopover===this._openColorControl))||(this._openColorControl=null)};connectedCallback(){super.connectedCallback(),Hr(),this._media=globalThis.matchMedia?.("(prefers-color-scheme: dark)"),this._systemTheme=this._media?.matches?"dark":"light",this._media?.addEventListener("change",this._handleMediaChange),globalThis.document?.addEventListener("pointerdown",this._handleDocumentPointerDown,!0)}disconnectedCallback(){this._media?.removeEventListener("change",this._handleMediaChange),globalThis.document?.removeEventListener("pointerdown",this._handleDocumentPointerDown,!0),this._copyTimeout&&clearTimeout(this._copyTimeout),super.disconnectedCallback()}updated(e){(e.has("sources")||e.has("manifestUrl")||e.has("spriteUrl"))&&this._loadSources(),e.has("colorTheme")&&this._syncThemeColors()}get _resolvedColorTheme(){return this.colorTheme==="auto"?this._systemTheme:this.colorTheme}get _themeColor(){return this._resolvedColorTheme==="dark"?"#e5e5e5":"#1a1a1a"}_effectiveSources(){const e=Xe(this.sources);return e.length>0?e:this.manifestUrl&&this.spriteUrl?[{manifestUrl:this.manifestUrl,spriteUrl:this.spriteUrl}]:[]}async _loadSources(){const e=++this._loadVersion,t=this._effectiveSources(),r=[],i=[],o=[];this.manifestUrl&&!this.spriteUrl&&Xe(this.sources).length===0&&o.push("The sprite-url attribute is required with manifest-url.");for(const n of t){if(typeof n=="function"||Dt(n)){i.push(n);continue}try{r.push(ee(n))}catch(l){o.push(l instanceof Error?l.message:String(l))}}if(this._manifests=r.sort(Qe),this._errors=o,this._loading=i.length>0,this._selected=null,i.length===0)return;const s=await Promise.allSettled(i.map(Or));if(e!==this._loadVersion)return;const a=[];for(const n of s)n.status==="fulfilled"?a.push(n.value):o.push(n.reason instanceof Error?n.reason.message:String(n.reason));this._manifests=[...r,...a].sort(Qe),this._errors=[...o],this._loading=!1}_syncThemeColors(){this._selected&&(this._colors={...rt(this._selected.icon,this._themeColor),...this._colorOverrides},this._cssColorOverridden||(this._cssColor=this._themeColor))}_toggleTheme(){const e=this._resolvedColorTheme==="dark"?"light":"dark";this.themeControlled||(this.colorTheme=e),this.dispatchEvent(new CustomEvent("color-theme-change",{bubbles:!0,composed:!0,detail:{theme:e}}))}async _selectIcon(e,t){const r=`${e.name}:${e.spriteUrl}:${t.id}`;this._selected={key:r,manifest:e,icon:t},this._activeTab=fe(e)[0]?.id??"svg",this._colorOverrides={},this._colors=rt(t,this._themeColor),this._cssColor=this._themeColor,this._cssColorOverridden=!1,this._openColorControl=null,this._copied=!1,await this.updateComplete;const i=this.renderRoot.querySelector("dialog");i&&!i.open&&i.showModal()}_closeDialog(){const e=this.renderRoot.querySelector("dialog");e?.open&&e.close(),this._selected=null,this._openColorControl=null}_handleBackdropClick(e){if(!(e.currentTarget instanceof HTMLDialogElement)||e.target!==e.currentTarget)return;const t=e.currentTarget.getBoundingClientRect();(e.clientXt.right||e.clientYt.bottom)&&this._closeDialog()}_handleTabKeyDown(e,t){if(!this._selected)return;const r=fe(this._selected.manifest);let i=null;if(e.key==="ArrowRight"&&(i=(t+1)%r.length),e.key==="ArrowLeft"&&(i=(t-1+r.length)%r.length),e.key==="Home"&&(i=0),e.key==="End"&&(i=r.length-1),i===null)return;e.preventDefault(),this._activeTab=r[i].id;const o=this.renderRoot.querySelectorAll('[role="tab"]');this.updateComplete.then(()=>o[i]?.focus())}_handleColorChange(e,t){const r=R(t);this._colors={...this._colors,[e]:r},this._colorOverrides={...this._colorOverrides,[e]:r}}_handleCssColorChange(e){this._cssColor=R(e),this._cssColorOverridden=!0}async _copyCode(e){if(globalThis.navigator?.clipboard)try{await globalThis.navigator.clipboard.writeText(e),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=setTimeout(()=>{this._copied=!1},1500)}catch{this._copied=!1}}_renderColorControl(e,t,r,i){const o=this._openColorControl===r,s=`color-${r.replace(/[^a-zA-Z0-9_-]/g,"-")}`;return p` -
- - ${e} - ${o?p` - - `:c} -
- `}_renderDialogPreview(e,t){const r=`${e.spriteUrl}#${t.id}`;return this._activeTab==="img"?p`${t.name}`:this._activeTab==="css"?p` - - `:p` - - - - `}_renderDialog(){if(!this._selected)return c;const{manifest:e,icon:t}=this._selected,r=fe(e),i=r.some(n=>n.id===this._activeTab)?this._activeTab:r[0].id,o=yr({manifest:e,icon:t,tab:i,colorOverrides:this._colorOverrides,cssColor:this._cssColor}),s=wr(t.viewBox),a=i!=="img"&&i!=="css";return p` - {n.preventDefault(),this._closeDialog()}} - @click=${this._handleBackdropClick} - > -
- - -
-
- ${this._renderDialogPreview(e,t)} -
-
- -
-

${t.name}

- ${s?p`${s}`:c} -
-

${e.name} · ${e.format} · ${e.target}

- -
- ${a&&t.colors.length>0?p` -

- Цвета применяются к превью через CSS-переменные и попадут в пример кода. -

-

CSS Variables

- ${t.colors.map(({variable:n,fallback:l})=>this._renderColorControl(`${n}: ${l}`,this._colors[n],n,g=>this._handleColorChange(n,g)))} - `:c} - ${a&&t.colors.length===0?p` -

У иконки нет настраиваемых цветовых переменных.

- `:c} - ${i==="img"?p` -

- IMG изолирует SVG: CSS-переменные и currentColor внутрь изображения не передаются. -

- `:c} - ${i==="css"?p` -

- CSS mask отображает иконку одним цветом через background-color. -

- ${this._renderColorControl("background-color",this._cssColor,"background-color",n=>this._handleCssColorChange(n))} - `:c} -
- -
- ${r.map((n,l)=>p` - - `)} -
- -
-
${_r(Sr(o.code,o.language))}
- -
-
-
- `}render(){const e=this._query.trim().toLowerCase(),t=this._manifests.map(o=>({manifest:o,icons:o.icons.filter(s=>e===""||s.name.toLowerCase().includes(e)||o.name.toLowerCase().includes(e))})).filter(o=>o.icons.length>0),r=this._manifests.reduce((o,s)=>o+s.iconCount,0),i=t.reduce((o,s)=>o+s.icons.length,0);return p` -
-
-

${this.viewerTitle}

- - ${tt(this._manifests.length,["спрайт","спрайта","спрайтов"])} - · ${tt(r,["иконка","иконки","иконок"])} - ${e?` · найдено ${i}`:c} - -
- {this._query=o.currentTarget.value}} - placeholder="Найти иконку" - aria-label="Поиск иконок" - > - ${this.showThemeToggle?p` - - `:c} -
-
- - ${this._errors.length>0?p` - - `:c} - - ${t.map(({manifest:o,icons:s})=>p` -
-
-

${o.name}

- ${o.format} - ${s.length} - ${o.description?p` -

${o.description}

- `:c} -
-
- ${s.map(a=>p` - - `)} -
-
- `)} - - ${t.length===0&&(!this._loading||this._manifests.length>0)?p` -
- ${this._manifests.length===0?"Спрайты не подключены":"Иконки не найдены"} -
- `:c} - ${this._loading&&this._manifests.length===0?p` -
Загрузка спрайтов...
- `:c} - - - - ${this._renderDialog()} -
- `}};function Dr(){customElements.get(et)||customElements.define(et,Nr)}Dr();/*! Bundled license information: - -@lit/reactive-element/css-tag.js: - (** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -@lit/reactive-element/reactive-element.js: -lit-html/lit-html.js: -lit-element/lit-element.js: -lit-html/directive.js: -lit-html/directives/unsafe-html.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/is-server.js: - (** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directives/if-defined.js: -lit-html/directives/style-map.js: - (** - * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) -*/export{Dr as defineSpriteViewerElement}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/index.js b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/index.js deleted file mode 100644 index 4712d99..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/index.js +++ /dev/null @@ -1 +0,0 @@ -import"solid-js/web";import"solid-js";import{H as p}from"./assets/index-AIk5O37p.js";export{p as default}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/server-fns.js b/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/server-fns.js deleted file mode 100644 index 852231a..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/server-fns/_server/server-fns.js +++ /dev/null @@ -1 +0,0 @@ -import{h as s}from"./assets/server-fns-XxvbTHGR.js";import"cookie-es";import"solid-js";import"solid-js/web";import"solid-js/web/storage";import"h3";import"unctx";import"node:async_hooks";import"radix3";import"seroval";import"seroval-plugins/web";export{s as default}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/ssr/.vite/manifest.json b/integration/apps/solid-start-vite/.vinxi/build/ssr/.vite/manifest.json deleted file mode 100644 index 200df6d..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/ssr/.vite/manifest.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "../../../dist/viewer-element.js": { - "file": "assets/viewer-element-BO6fulPI.js", - "name": "viewer-element", - "src": "../../../dist/viewer-element.js", - "isDynamicEntry": true - }, - "_index-BWUdTtCi.css": { - "file": "assets/index-BWUdTtCi.css", - "src": "_index-BWUdTtCi.css" - }, - "_index-CV0w8CD4.js": { - "file": "assets/index-CV0w8CD4.js", - "name": "index", - "isDynamicEntry": true, - "dynamicImports": [ - "../../../dist/viewer-element.js", - "src/sprite/.svg-sprite/svg-sprite.manifest.js" - ], - "css": [ - "assets/index-BWUdTtCi.css" - ], - "assets": [ - "assets/sprite-DvsqBNon.svg" - ] - }, - "src/routes/index.jsx?pick=default&pick=$css": { - "file": "index.js", - "name": "index", - "src": "src/routes/index.jsx?pick=default&pick=$css", - "isEntry": true, - "imports": [ - "_index-CV0w8CD4.js" - ] - }, - "src/sprite/.svg-sprite/sprite.svg": { - "file": "assets/sprite-DvsqBNon.svg", - "src": "src/sprite/.svg-sprite/sprite.svg" - }, - "src/sprite/.svg-sprite/svg-sprite.manifest.js": { - "file": "assets/svg-sprite.manifest-Di7XhmOO.js", - "name": "svg-sprite.manifest", - "src": "src/sprite/.svg-sprite/svg-sprite.manifest.js", - "isDynamicEntry": true, - "imports": [ - "_index-CV0w8CD4.js" - ] - }, - "virtual:$vinxi/handler/ssr": { - "file": "ssr.js", - "name": "ssr", - "src": "virtual:$vinxi/handler/ssr", - "isEntry": true, - "dynamicImports": [ - "src/routes/index.jsx?pick=default&pick=$css", - "src/routes/index.jsx?pick=default&pick=$css" - ], - "css": [ - "assets/ssr-BVONibDl.css" - ] - } -} \ No newline at end of file diff --git a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/index-BWUdTtCi.css b/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/index-BWUdTtCi.css deleted file mode 100644 index 013ec25..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/index-BWUdTtCi.css +++ /dev/null @@ -1 +0,0 @@ -._root_1egzq_3{transition-property:fill,stroke,color;transition-duration:.3s;transition-timing-function:ease}._wrap_1egzq_9{display:inline-flex}._wrap_1egzq_9 svg{width:100%;height:100%;transition-property:fill,stroke,color;transition-duration:.3s;transition-timing-function:ease} diff --git a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/index-CV0w8CD4.js b/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/index-CV0w8CD4.js deleted file mode 100644 index d827752..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/index-CV0w8CD4.js +++ /dev/null @@ -1 +0,0 @@ -import{createComponent as p,ssrElement as n,mergeProps as i,ssr as r,ssrAttribute as c,escape as s,ssrHydrationKey as u}from"solid-js/web";import{splitProps as m,Show as d,onMount as w}from"solid-js";const h="_root_1egzq_3",v="_wrap_1egzq_9",l={root:h,wrap:v},g={check:"check"},f="/_build/assets/sprite-DvsqBNon.svg";var _=[""],b=[""];const k=t=>{const[e,o]=m(t,["icon","wrapped","class"]),a=()=>f+"#"+g[e.icon];return p(d,{get when(){return e.wrapped},get fallback(){return n("svg",i(o,{get class(){return[l.root,e.class].filter(Boolean).join(" ")}}),()=>r(b,c("href",s(a(),!0),!1)),!0)},get children(){return n("span",i(o,{get class(){return[l.wrap,e.class].filter(Boolean).join(" ")}}),()=>r(_,c("href",s(a(),!0),!1)),!0)}})};var y=["

SolidStart + Vite

",'
'];function H(){let t;return w(async()=>{await import("./viewer-element-BO6fulPI.js");const e=document.createElement("gromlab-sprite-viewer");e.viewerTitle="SolidStart Vite Viewer",e.sources=[()=>import("./svg-sprite.manifest-Di7XhmOO.js")],t.append(e)}),r(y,u(),s(p(k,{"data-testid":"icon","data-app":"solid-start-vite",icon:"check","aria-label":"Check icon",width:64,height:64,style:{"--icon-color-1":"#16a34a"}})))}export{H,f as s}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/sprite-DvsqBNon.svg b/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/sprite-DvsqBNon.svg deleted file mode 100644 index bd5742e..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/sprite-DvsqBNon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/ssr-BVONibDl.css b/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/ssr-BVONibDl.css deleted file mode 100644 index b9cce31..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/ssr-BVONibDl.css +++ /dev/null @@ -1 +0,0 @@ -:root{font-family:system-ui,sans-serif;color:#172033;background:#fff}body{margin:0;padding:40px}.viewer{margin-top:32px} diff --git a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/svg-sprite.manifest-Di7XhmOO.js b/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/svg-sprite.manifest-Di7XhmOO.js deleted file mode 100644 index 3516d62..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/svg-sprite.manifest-Di7XhmOO.js +++ /dev/null @@ -1 +0,0 @@ -import{s as o}from"./index-CV0w8CD4.js";import"solid-js/web";import"solid-js";const s={schemaVersion:1,generator:"@gromlab/svg-sprites",name:"icons",usage:{framework:"solid-start",componentName:"IconsIcon",ssr:!0},mode:"solid-start@vite",target:"vite",format:"stack",iconCount:1,spriteUrl:o,icons:[{name:"check",id:"check",viewBox:"0 0 24 24",colors:[{variable:"--icon-color-1",fallback:"currentColor"}]}]};export{s as default,s as spriteManifest}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/viewer-element-BO6fulPI.js b/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/viewer-element-BO6fulPI.js deleted file mode 100644 index a96cb71..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/ssr/assets/viewer-element-BO6fulPI.js +++ /dev/null @@ -1,602 +0,0 @@ -var Rt=Object.defineProperty,Lt=Object.getOwnPropertyNames,m=(e,t,r)=>function(){if(r)throw r[0];try{return e&&(t=(0,e[Lt(e)[0]])(e=0)),t}catch(o){throw r=[o],o}},it=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},E,u,te=m({"node_modules/vanilla-colorful/lib/utils/math.js"(){E=(e,t=0,r=1)=>e>r?r:eMath.round(r*e)/r}}),ot,Y,st,Pe,Z,He,S,Ue,Ne,re=m({"node_modules/vanilla-colorful/lib/utils/convert.js"(){te(),ot=e=>Ne(Y(e)),Y=e=>(e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?u(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?u(parseInt(e.substring(6,8),16)/255,2):1}),st=e=>Ue(He(e)),Pe=({h:e,s:t,v:r,a:i})=>{const o=(200-t)*r/100;return{h:u(e),s:u(o>0&&o<200?t*r/100/(o<=100?o:200-o)*100:0),l:u(o/2),a:u(i,2)}},Z=e=>{const{h:t,s:r,l:i}=Pe(e);return`hsl(${t}, ${r}%, ${i}%)`},He=({h:e,s:t,v:r,a:i})=>{e=e/360*6,t=t/100,r=r/100;const o=Math.floor(e),s=r*(1-t),a=r*(1-(e-o)*t),n=r*(1-(1-e+o)*t),l=o%6;return{r:u([r,a,s,s,n,r][l]*255),g:u([n,r,r,a,s,s][l]*255),b:u([s,s,n,r,r,a][l]*255),a:u(i,2)}},S=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},Ue=({r:e,g:t,b:r,a:i})=>{const o=i<1?S(u(i*255)):"";return"#"+S(e)+S(t)+S(r)+o},Ne=({r:e,g:t,b:r,a:i})=>{const o=Math.max(e,t,r),s=o-Math.min(e,t,r),a=s?o===e?(t-r)/s:o===t?2+(r-e)/s:4+(e-t)/s:0;return{h:u(60*(a<0?a+6:a)),s:u(o?s/o*100:0),v:u(o/255*100),a:i}}}}),$e,at,nt=m({"node_modules/vanilla-colorful/lib/utils/compare.js"(){re(),$e=(e,t)=>{if(e===t)return!0;for(const r in e)if(e[r]!==t[r])return!1;return!0},at=(e,t)=>e.toLowerCase()===t.toLowerCase()?!0:$e(Y(e),Y(t))}}),ae,ie,X,Ae=m({"node_modules/vanilla-colorful/lib/utils/dom.js"(){ae={},ie=e=>{let t=ae[e];return t||(t=document.createElement("template"),t.innerHTML=e,ae[e]=t),t},X=(e,t,r)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}}}),w,z,De,ne,Re,Ee,lt=m({"node_modules/vanilla-colorful/lib/components/slider.js"(){Ae(),te(),w=!1,z=e=>"touches"in e,De=e=>w&&!z(e)?!1:(w||(w=z(e)),!0),ne=(e,t)=>{const r=z(t)?t.touches[0]:t,i=e.el.getBoundingClientRect();X(e.el,"move",e.getMove({x:E((r.pageX-(i.left+window.pageXOffset))/i.width),y:E((r.pageY-(i.top+window.pageYOffset))/i.height)}))},Re=(e,t)=>{const r=t.keyCode;r>40||e.xy&&r<37||r<33||(t.preventDefault(),X(e.el,"move",e.getMove({x:r===39?.01:r===37?-.01:r===34?.05:r===33?-.05:r===35?1:r===36?-1:0,y:r===40?.01:r===38?-.01:0},!0)))},Ee=class{constructor(e,t,r,i){const o=ie(`
`);e.appendChild(o.content.cloneNode(!0));const s=e.querySelector(`[part=${t}]`);s.addEventListener("mousedown",this),s.addEventListener("touchstart",this),s.addEventListener("keydown",this),this.el=s,this.xy=i,this.nodes=[s.firstChild,s]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(w?"touchmove":"mousemove",this),t(w?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!De(e)||!w&&e.button!=0)return;this.el.focus(),ne(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),ne(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":Re(this,e);break}}style(e){e.forEach((t,r)=>{for(const i in t)this.nodes[r].style.setProperty(i,t[i])})}}}}),ct,jt=m({"node_modules/vanilla-colorful/lib/components/hue.js"(){lt(),re(),te(),ct=class extends Ee{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:`${e/360*100}%`,color:Z({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${u(e)}`)}getMove(e,t){return{h:t?E(this.h+e.x*360,0,360):360*e.x}}}}}),dt,zt=m({"node_modules/vanilla-colorful/lib/components/saturation.js"(){lt(),re(),te(),dt=class extends Ee{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:`${100-e.v}%`,left:`${e.s}%`,color:Z(e)},{"background-color":Z({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${u(e.s)}%, Brightness ${u(e.v)}%`)}getMove(e,t){return{s:t?E(this.hsva.s+e.x*100,0,100):e.x*100,v:t?E(this.hsva.v-e.y*100,0,100):Math.round(100-e.y*100)}}}}}),ht,Bt=m({"node_modules/vanilla-colorful/lib/styles/color-picker.js"(){ht=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}'}}),pt,It=m({"node_modules/vanilla-colorful/lib/styles/hue.js"(){pt="[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}"}}),ut,Vt=m({"node_modules/vanilla-colorful/lib/styles/saturation.js"(){ut="[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"}}),T,B,le,I,ce,de,he,gt,qt=m({"node_modules/vanilla-colorful/lib/components/color-picker.js"(){nt(),Ae(),jt(),zt(),Bt(),It(),Vt(),T=Symbol("same"),B=Symbol("color"),le=Symbol("hsva"),I=Symbol("update"),ce=Symbol("parts"),de=Symbol("css"),he=Symbol("sliders"),gt=class extends HTMLElement{static get observedAttributes(){return["color"]}get[de](){return[ht,pt,ut]}get[he](){return[dt,ct]}get color(){return this[B]}set color(e){if(!this[T](e)){const t=this.colorModel.toHsva(e);this[I](t),this[B]=e}}constructor(){super();const e=ie(``),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[ce]=this[he].map(r=>new r(t))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,r){const i=this.colorModel.fromAttr(r);this[T](i)||(this.color=i)}handleEvent(e){const t=this[le],r={...t,...e.detail};this[I](r);let i;!$e(r,t)&&!this[T](i=this.colorModel.fromHsva(r))&&(this[B]=i,X(this,"color-changed",{value:i}))}[T](e){return this.color&&this.colorModel.equal(e,this.color)}[I](e){this[le]=e,this[ce].forEach(t=>t.update(e))}}}}),mt={};it(mt,{HexBase:()=>vt});var Le,vt,Ft=m({"node_modules/vanilla-colorful/lib/entrypoints/hex.js"(){qt(),re(),nt(),Le={defaultColor:"#000",toHsva:ot,fromHsva:({h:e,s:t,v:r})=>st({h:e,s:t,v:r,a:1}),equal:at,fromAttr:e=>e},vt=class extends gt{get colorModel(){return Le}}}}),je,G,Jt=m({"node_modules/vanilla-colorful/lib/utils/validate.js"(){je=/^#?([0-9A-F]{3,8})$/i,G=(e,t)=>{const r=je.exec(e),i=r?r[1].length:0;return i===3||i===6||!!t&&i===4||!!t&&i===8}}}),_t={};it(_t,{HexInputBase:()=>ft});var ze,pe,ue,M,ge,V,q,me,C,ft,Wt=m({"node_modules/vanilla-colorful/lib/entrypoints/hex-input.js"(){Jt(),Ae(),ze=ie(''),pe=(e,t)=>e.replace(/([^0-9A-F]+)/gi,"").substring(0,t?8:6),ue=Symbol("alpha"),M=Symbol("color"),ge=Symbol("saved"),V=Symbol("input"),q=Symbol("init"),me=Symbol("prefix"),C=Symbol("update"),ft=class extends HTMLElement{static get observedAttributes(){return["alpha","color","prefixed"]}get color(){return this[M]}set color(e){this[M]=e,this[C](e)}get alpha(){return this[ue]}set alpha(e){this[ue]=e,this.toggleAttribute("alpha",e);const t=this.color;t&&!G(t,e)&&(this.color=t.startsWith("#")?t.substring(0,t.length===5?4:7):t.substring(0,t.length===4?3:6))}get prefixed(){return this[me]}set prefixed(e){this[me]=e,this.toggleAttribute("prefixed",e),this[C](this.color)}constructor(){super();const e=this.attachShadow({mode:"open"});e.appendChild(ze.content.cloneNode(!0)),e.firstElementChild.addEventListener("slotchange",()=>this[q](e))}connectedCallback(){if(this[q](this.shadowRoot),this.hasOwnProperty("alpha")){const e=this.alpha;delete this.alpha,this.alpha=e}else this.alpha=this.hasAttribute("alpha");if(this.hasOwnProperty("prefixed")){const e=this.prefixed;delete this.prefixed,this.prefixed=e}else this.prefixed=this.hasAttribute("prefixed");if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color==null?this.color=this.getAttribute("color")||"":this[M]&&this[C](this[M])}handleEvent(e){const t=e.target,{value:r}=t;switch(e.type){case"input":const i=pe(r,this.alpha);this[ge]=this.color,(G(i,this.alpha)||r==="")&&(this.color=i,this.dispatchEvent(new CustomEvent("color-changed",{bubbles:!0,detail:{value:i?"#"+i:""}})));break;case"blur":r&&!G(r,this.alpha)&&(this.color=this[ge])}}attributeChangedCallback(e,t,r){e==="color"&&this.color!==r&&(this.color=r);const i=r!=null;e==="alpha"&&this.alpha!==i&&(this.alpha=i),e==="prefixed"&&this.prefixed!==i&&(this.prefixed=i)}[q](e){let t=this.querySelector("input");if(!t){let r;for(;r=this.firstChild;)r.remove();t=e.querySelector("input")}t.addEventListener("input",this),t.addEventListener("blur",this),this[V]=t,this[C](this.color)}[C](e){this[V]&&(this[V].value=e==null||e==""?"":(this.prefixed?"#":"")+pe(e,this.alpha))}}}}),K=globalThis,ke=K.ShadowRoot&&(K.ShadyCSS===void 0||K.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bt=Symbol(),Be=new WeakMap,Gt=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==bt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(ke&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Be.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Be.set(t,e))}return e}toString(){return this.cssText}},wt=e=>new Gt(typeof e=="string"?e:e+"",void 0,bt),Kt=(e,t)=>{if(ke)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of t){const i=document.createElement("style"),o=K.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=r.cssText,e.appendChild(i)}},Ie=ke?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const i of t.cssRules)r+=i.cssText;return wt(r)})(e):e,{is:Yt,defineProperty:Zt,getOwnPropertyDescriptor:Xt,getOwnPropertyNames:Qt,getOwnPropertySymbols:er,getPrototypeOf:tr}=Object,oe=globalThis,Ve=oe.trustedTypes,rr=Ve?Ve.emptyScript:"",ir=oe.reactiveElementPolyfillSupport,H=(e,t)=>e,xe={toAttribute(e,t){switch(t){case Boolean:e=e?rr:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},$t=(e,t)=>!Yt(e,t),qe={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:$t};Symbol.metadata??=Symbol("metadata"),oe.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=qe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&Zt(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){const{get:i,set:o}=Xt(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:i,set(s){const a=i?.call(this);o?.call(this,s),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qe}static _$Ei(){if(this.hasOwnProperty(H("elementProperties")))return;const e=tr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(H("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(H("properties"))){const t=this.properties,r=[...Qt(t),...er(t)];for(const i of r)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,i]of t)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)t.unshift(Ie(i))}else e!==void 0&&t.push(Ie(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Kt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const o=(r.converter?.toAttribute!==void 0?r.converter:xe).toAttribute(t,r.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:xe;this._$Em=i;const a=s.fromAttribute(t,o.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(e,t,r,i=!1,o){if(e!==void 0){const s=this.constructor;if(i===!1&&(o=this[e]),r??=s.getPropertyOptions(e),!((r.hasChanged??$t)(o,t)||r.useDefault&&r.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:i,wrapped:o},s){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),o!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,o]of r){const{wrapped:s}=o,a=this[i];s!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,o,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[H("elementProperties")]=new Map,A[H("finalized")]=new Map,ir?.({ReactiveElement:A}),(oe.reactiveElementVersions??=[]).push("2.1.2");var Se=globalThis,Fe=e=>e,Q=Se.trustedTypes,Je=Q?Q.createPolicy("lit-html",{createHTML:e=>e}):void 0,xt="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,yt="?"+f,or=`<${yt}>`,y=document,N=()=>y.createComment(""),D=e=>e===null||typeof e!="object"&&typeof e!="function",Te=Array.isArray,sr=e=>Te(e)||typeof e?.[Symbol.iterator]=="function",ve=`[ -\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,We=/-->/g,Ge=/>/g,$=RegExp(`>|${ve}(?:([^\\s"'>=/]+)(${ve}*=${ve}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),Ke=/'/g,Ye=/"/g,Ct=/^(?:script|style|textarea|title)$/i,ar=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),p=ar(1),b=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Ze=new WeakMap,x=y.createTreeWalker(y,129);function At(e,t){if(!Te(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Je!==void 0?Je.createHTML(t):t}var nr=(e,t)=>{const r=e.length-1,i=[];let o,s=t===2?"":t===3?"":"",a=O;for(let n=0;n"?(a=o??O,h=-1):d[1]===void 0?h=-2:(h=a.lastIndex-d[2].length,g=d[1],a=d[3]===void 0?$:d[3]==='"'?Ye:Ke):a===Ye||a===Ke?a=$:a===We||a===Ge?a=O:(a=$,o=void 0);const _=a===$&&e[n+1].startsWith("/>")?" ":"";s+=a===O?l+or:h>=0?(i.push(g),l.slice(0,h)+xt+l.slice(h)+f+_):l+f+(h===-2?n:_)}return[At(e,s+(e[r]||"")+(t===2?"":t===3?"":"")),i]},ye=class Et{constructor({strings:t,_$litType$:r},i){let o;this.parts=[];let s=0,a=0;const n=t.length-1,l=this.parts,[g,d]=nr(t,r);if(this.el=Et.createElement(g,i),x.currentNode=this.el.content,r===2||r===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=x.nextNode())!==null&&l.length0){o.textContent=Q?Q.emptyScript:"";for(let _=0;_2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(e,t=this,r,i){const o=this.strings;let s=!1;if(o===void 0)e=k(this,e,t,0),s=!D(e)||e!==this._$AH&&e!==b,s&&(this._$AH=e);else{const a=e;let n,l;for(e=o[0],n=0;n{const i=r?.renderBefore??t;let o=i._$litPart$;if(o===void 0){const s=r?.renderBefore??null;i._$litPart$=o=new Me(t.insertBefore(N(),s),s,void 0,r??{})}return o._$AI(e),o},Oe=globalThis,U=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=gr(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return b}};U._$litElement$=!0,U.finalized=!0,Oe.litElementHydrateSupport?.({LitElement:U});var mr=Oe.litElementPolyfillSupport;mr?.({LitElement:U});(Oe.litElementVersions??=[]).push("4.2.2");var F=e=>e??c,St={ATTRIBUTE:1,CHILD:2},Tt=e=>(...t)=>({_$litDirective$:e,values:t}),Mt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},Ot="important",vr=" !"+Ot,_e=Tt(class extends Mt{constructor(e){if(super(e),e.type!==St.ATTRIBUTE||e.name!=="style"||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const i=e[r];return i==null?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){const{style:r}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?r.removeProperty(i):r[i]=null);for(const i in t){const o=t[i];if(o!=null){this.ft.add(i);const s=typeof o=="string"&&o.endsWith(vr);i.includes("-")||s?r.setProperty(i,s?o.slice(0,-11):o,s?Ot:""):r[i]=o}}return b}}),Ce=class extends Mt{constructor(e){if(super(e),this.it=c,e.type!==St.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===c||e==null)return this._t=void 0,this.it=e;if(e===b)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Ce.directiveName="unsafeHTML",Ce.resultType=1;var _r=Tt(Ce),fr=[{id:"svg",label:"SVG"},{id:"img",label:"IMG"},{id:"css",label:"CSS"}],br={react:"React",vue:"Vue",svelte:"Svelte",angular:"Angular",astro:"Astro",solid:"Solid","solid-start":"SolidStart",preact:"Preact",qwik:"Qwik",lit:"Lit",alpine:"Alpine"};function Pt(e){return e.usage?e.usage:e.componentName?{framework:"react",componentName:e.componentName}:null}function fe(e){const t=Pt(e),i=[...t?[{id:t.framework,label:br[t.framework]}]:[],...fr];return e.format==="stack"?i:i.filter(o=>o.id!=="img"&&o.id!=="css")}function wr(e){if(!e)return null;const t=e.trim().split(/[\s,]+/).map(Number);return t.length===4&&t.every(Number.isFinite)?`${t[2]} × ${t[3]}`:null}function R(e,t="#1a1a1a"){const r=e.trim().toLowerCase();if(r==="currentcolor")return R(t);const i=r.match(/^#([\da-f])([\da-f])([\da-f])(?:[\da-f])?$/i);if(i)return`#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}`;const o=r.match(/^#([\da-f]{6})(?:[\da-f]{2})?$/i);if(o)return`#${o[1]}`;const s=r.match(/^rgba?\(\s*(\d+)\s*[, ]\s*(\d+)\s*[, ]\s*(\d+)/);return s?`#${s.slice(1,4).map(n=>Math.min(255,Number(n)).toString(16).padStart(2,"0")).join("")}`:{black:"#000000",blue:"#0000ff",cyan:"#00ffff",gray:"#808080",green:"#008000",grey:"#808080",magenta:"#ff00ff",orange:"#ffa500",pink:"#ffc0cb",purple:"#800080",red:"#ff0000",white:"#ffffff",yellow:"#ffff00"}[r]??R(t===e?"#1a1a1a":t)}function $r(e){return Object.entries(e).map(([t,r])=>` ${JSON.stringify(t)}: ${JSON.stringify(r)},`)}function P(e){const t={"&":"&",'"':""","<":"<",">":">"};return e.replace(/[&"<>]/g,r=>t[r])}function xr(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function yr(e){const{manifest:t,icon:r,tab:i,colorOverrides:o,cssColor:s}=e,a=`${t.spriteUrl}#${r.id}`,n=$r(o);if(!["svg","img","css"].includes(i)){const d=Pt(t);if(!d)throw new Error(`The ${i} code tab requires component metadata.`);if(d.framework==="alpine")return{code:``,language:"html"};if(d.framework==="lit")return{code:`<${d.tagName} icon=${JSON.stringify(r.name)}>`,language:"html"};if(d.framework==="angular")return{code:`<${d.selector} icon=${JSON.stringify(r.name)}>`,language:"html"};if(d.framework==="vue"){const h=Object.entries(o).map(([v,_])=>`${JSON.stringify(v)}: ${JSON.stringify(_)}`).join(", ");return{code:`<${d.componentName} icon=${JSON.stringify(r.name)}${h?` :style="{ ${P(h)} }"`:""} />`,language:"html"}}return n.length===0?{code:`<${d.componentName} icon=${JSON.stringify(r.name)} />`,language:"tsx"}:{code:[`<${d.componentName}`,` icon=${JSON.stringify(r.name)}`," style={{",...n," }}","/>"].join(` -`),language:"tsx"}}if(i==="svg"){const d=Object.entries(o).map(([h,v])=>`${h}: ${v}`).join("; ");return{code:` - -`,language:"html"}}if(i==="img")return{code:`${P(r.name)}`,language:"html"};const l=`icon-${r.name.replace(/[^a-zA-Z0-9_-]+/g,"-")||"sprite"}`,g=xr(a);return{code:[`.${l} {`," width: 24px;"," height: 24px;",` mask: url('${g}') no-repeat center / contain;`,` -webkit-mask: url('${g}') no-repeat center / contain;`,` background-color: ${s};`,"}"].join(` -`),language:"css"}}var Cr=/[&<>"]/g,Ar={"&":"&","<":"<",">":">",'"':"""},Er=[[//g,"comment"],[/<\/?[\w.-]+/g,"tag"],[/[\w-]+(?=\s*=)/g,"attr"],[/"[^"]*"|'[^']*'/g,"string"]],kr=[[/\/\*[\s\S]*?\*\//g,"comment"],[/\.[\w-]+/g,"selector"],[/[\w-]+(?=\s*:)/g,"property"],[/'[^']*'|"[^"]*"/g,"string"],[/#[\da-fA-F]{3,8}\b/g,"color"],[/\d+(?:\.\d+)?(?:px|em|rem|%)?/g,"number"]];function Sr(e,t){const r=t==="css"?kr:Er,i=[];let o=0;for(;o{const n=a.replace(Cr,l=>Ar[l]);return s?`${n}`:n}).join("")}var J=new WeakMap;function L(e){return e!==null&&typeof e=="object"}function Ht(e){return L(e)?typeof e.name=="string"&&typeof e.id=="string"&&(e.viewBox===null||typeof e.viewBox=="string")&&Array.isArray(e.colors):!1}function Ut(e){return L(e)?e.schemaVersion===1&&e.generator==="@gromlab/svg-sprites"&&typeof e.name=="string"&&typeof e.target=="string"&&(e.format==="stack"||e.format==="symbol")&&typeof e.iconCount=="number"&&typeof e.spriteUrl=="string"&&Array.isArray(e.icons)&&e.icons.every(Ht):!1}function Nt(e){return L(e)&&e.schemaVersion===1&&e.generator==="@gromlab/svg-sprites"&&typeof e.name=="string"&&typeof e.target=="string"&&(e.format==="stack"||e.format==="symbol")&&typeof e.iconCount=="number"&&Array.isArray(e.icons)&&e.icons.every(Ht)}function Tr(e){return!L(e)||Ut(e)||Nt(e)?e:e.default??e.spriteManifest??e}function ee(e,t){const r=Tr(e);if(Ut(r))return r;if(t&&Nt(r))return{...r,spriteUrl:t};throw new Error("The loaded source does not contain a valid SVG sprite manifest.")}function Xe(e){return Array.isArray(e)?e:Object.values(e)}function Dt(e){if(!L(e))return!1;const t=e;return typeof t.manifestUrl=="string"&&typeof t.spriteUrl=="string"}function Qe(e,t){return e.namet.name?1:0}async function Mr(e){const t=await fetch(e.manifestUrl);if(!t.ok)throw new Error(`Cannot load SVG sprite manifest: ${t.status} ${t.statusText}`);return ee(await t.json(),e.spriteUrl)}async function Or(e){if(Dt(e))return Mr(e);if(typeof e!="function")return ee(e);const t=J.get(e);if(t)return t;const r=Promise.resolve().then(e).then(i=>ee(i));return J.set(e,r),r.catch(()=>{J.get(e)===r&&J.delete(e)}),r}var Pr=` -:host { display: block; } -.gromlab-sprite-viewer { - --sv-bg: #f0f0f3; - --sv-text: #1a1a1a; - --sv-card: #ffffff; - --sv-card-hover: #eaeaed; - --sv-border: #d8d8d8; - --sv-accent: #3b82f6; - --sv-muted: #777777; - --sv-code: #f5f5f5; - --sv-checker-a: #e9e9e9; - --sv-checker-b: #ffffff; - --sv-danger: #b42332; - box-sizing: border-box; - min-height: 320px; - padding: 24px; - color: var(--sv-text); - color-scheme: light; - background: var(--sv-bg); - border-radius: 12px; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -} -.gromlab-sprite-viewer[data-theme="dark"] { - --sv-bg: #1a1a1a; - --sv-text: #e5e5e5; - --sv-card: #2a2a2a; - --sv-card-hover: #333333; - --sv-border: #404040; - --sv-muted: #a3a3a3; - --sv-code: #242424; - --sv-checker-a: #333333; - --sv-checker-b: #2a2a2a; - --sv-danger: #ff9ba6; - color-scheme: dark; -} -@media (prefers-color-scheme: dark) { - .gromlab-sprite-viewer:not([data-theme]) { - --sv-bg: #1a1a1a; - --sv-text: #e5e5e5; - --sv-card: #2a2a2a; - --sv-card-hover: #333333; - --sv-border: #404040; - --sv-muted: #a3a3a3; - --sv-code: #242424; - --sv-checker-a: #333333; - --sv-checker-b: #2a2a2a; - --sv-danger: #ff9ba6; - color-scheme: dark; - } -} -.gromlab-sprite-viewer *, -.gromlab-sprite-viewer *::before, -.gromlab-sprite-viewer *::after { box-sizing: border-box; } -.gromlab-sprite-viewer button, -.gromlab-sprite-viewer input { font: inherit; } -.gromlab-sprite-viewer__header { - display: flex; - align-items: center; - gap: 16px; - flex-wrap: wrap; - margin-bottom: 24px; -} -.gromlab-sprite-viewer__title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; } -.gromlab-sprite-viewer__summary { color: var(--sv-muted); font-size: 13px; } -.gromlab-sprite-viewer__toolbar { display: flex; align-items: center; gap: 12px; margin-left: auto; } -.gromlab-sprite-viewer__search { - width: 220px; - height: 38px; - padding: 0 12px; - color: var(--sv-text); - background: var(--sv-card); - border: 1px solid var(--sv-border); - border-radius: 8px; - outline: none; - transition: border-color .15s, box-shadow .15s; -} -.gromlab-sprite-viewer__search:focus { border-color: var(--sv-accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); } -.gromlab-sprite-viewer__search::placeholder { color: var(--sv-muted); } -.gromlab-sprite-viewer__theme { - display: grid; - place-items: center; - width: 38px; - height: 38px; - padding: 0; - color: var(--sv-text); - background: var(--sv-card); - border: 1px solid var(--sv-border); - border-radius: 8px; - cursor: pointer; - transition: background .15s, border-color .15s; -} -.gromlab-sprite-viewer__theme:hover { background: var(--sv-card-hover); } -.gromlab-sprite-viewer__theme:focus-visible, -.gromlab-sprite-viewer__card:focus-visible, -.gromlab-sprite-viewer__close:focus-visible, -.gromlab-sprite-viewer__tab:focus-visible, -.gromlab-sprite-viewer__copy:focus-visible, -.gromlab-sprite-viewer__swatch:focus-visible { - outline: 2px solid var(--sv-accent); - outline-offset: 2px; -} -.gromlab-sprite-viewer__errors { - margin: 0 0 24px; - padding: 12px 14px; - color: var(--sv-danger); - background: rgba(180, 35, 50, .08); - border: 1px solid rgba(180, 35, 50, .28); - border-radius: 8px; - font-size: 12px; -} -.gromlab-sprite-viewer__group { margin-bottom: 40px; } -.gromlab-sprite-viewer__group-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } -.gromlab-sprite-viewer__group-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; } -.gromlab-sprite-viewer__badge { - padding: 2px 8px; - color: #ffffff; - background: var(--sv-accent); - border-radius: 999px; - font-size: 11px; - line-height: 1.5; - font-weight: 600; - letter-spacing: .04em; - text-transform: uppercase; -} -.gromlab-sprite-viewer__group-count, -.gromlab-sprite-viewer__description { color: var(--sv-muted); font-size: 13px; font-weight: 400; } -.gromlab-sprite-viewer__description { flex-basis: 100%; margin: -2px 0 0; } -.gromlab-sprite-viewer__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; } -.gromlab-sprite-viewer__card { - display: flex; - min-width: 0; - padding: 16px 8px; - color: inherit; - text-align: center; - background: var(--sv-card); - border: 0; - border-radius: 8px; - cursor: pointer; - flex-direction: column; - align-items: center; - gap: 8px; - transition: background .15s, transform .15s; -} -.gromlab-sprite-viewer__card:hover { background: var(--sv-card-hover); transform: translateY(-1px); } -.gromlab-sprite-viewer__icon-wrap, -.gromlab-sprite-viewer__dialog-preview-canvas { - display: grid; - place-items: center; - background: conic-gradient( - var(--sv-checker-a) 25%, var(--sv-checker-b) 0 50%, - var(--sv-checker-a) 0 75%, var(--sv-checker-b) 0 - ); - background-size: 8px 8px; - border-radius: 4px; -} -.gromlab-sprite-viewer__icon-wrap { width: 128px; height: 128px; } -.gromlab-sprite-viewer__icon { display: block; width: 128px; height: 128px; color: var(--sv-text); overflow: visible; } -.gromlab-sprite-viewer__icon-name { - max-width: 100%; - overflow: hidden; - color: var(--sv-muted); - font-size: 13px; - line-height: 1.35; - text-overflow: ellipsis; - white-space: nowrap; -} -.gromlab-sprite-viewer__status { - padding: 40px 20px; - color: var(--sv-muted); - text-align: center; - background: var(--sv-card); - border: 1px dashed var(--sv-border); - border-radius: 8px; -} -.gromlab-sprite-viewer__footer { - display: flex; - align-items: center; - justify-content: center; - gap: 12px; - margin-top: 40px; - padding-top: 16px; - color: var(--sv-muted); - border-top: 1px solid var(--sv-border); - font-size: 13px; -} -.gromlab-sprite-viewer__footer a { color: var(--sv-accent); text-decoration: none; } -.gromlab-sprite-viewer__footer a:hover { text-decoration: underline; } -.gromlab-sprite-viewer__dialog { - width: min(560px, calc(100vw - 32px)); - max-width: none; - max-height: calc(100dvh - 48px); - padding: 0; - color: var(--sv-text); - background: transparent; - border: 0; - overflow: visible; -} -.gromlab-sprite-viewer__dialog::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); } -.gromlab-sprite-viewer__dialog-shell { - position: relative; - max-height: calc(100dvh - 48px); - padding: 24px; - overflow-y: auto; - color: var(--sv-text); - background: var(--sv-bg); - border: 1px solid var(--sv-border); - border-radius: 12px; - box-shadow: 0 24px 72px rgba(0, 0, 0, .28); -} -.gromlab-sprite-viewer__close { - position: absolute; - z-index: 2; - top: 12px; - right: 12px; - display: grid; - place-items: center; - width: 34px; - height: 34px; - padding: 0; - color: var(--sv-text); - background: var(--sv-bg); - border: 1px solid var(--sv-border); - border-radius: 8px; - cursor: pointer; -} -.gromlab-sprite-viewer__close:hover { background: var(--sv-card-hover); } -.gromlab-sprite-viewer__dialog-preview { display: flex; align-items: center; justify-content: center; padding: 24px; margin-bottom: 16px; background: var(--sv-card); border-radius: 8px; } -.gromlab-sprite-viewer__dialog-preview-canvas { width: 256px; height: 256px; } -.gromlab-sprite-viewer__dialog-icon, -.gromlab-sprite-viewer__dialog-img, -.gromlab-sprite-viewer__dialog-mask { display: block; width: 256px; height: 256px; } -.gromlab-sprite-viewer__dialog-icon { color: var(--sv-text); overflow: visible; } -.gromlab-sprite-viewer__dialog-img { object-fit: contain; } -.gromlab-sprite-viewer__dialog-heading { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; } -.gromlab-sprite-viewer__dialog-title { margin: 0; font: 600 16px/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__viewbox { - padding: 2px 8px; - color: var(--sv-muted); - background: var(--sv-card); - border: 1px solid var(--sv-border); - border-radius: 999px; - font-size: 11px; - white-space: nowrap; -} -.gromlab-sprite-viewer__dialog-meta { margin: 0 0 20px; color: var(--sv-muted); text-align: center; font-size: 12px; } -.gromlab-sprite-viewer__colors { margin-bottom: 20px; } -.gromlab-sprite-viewer__hint { - margin: 0 0 12px; - padding: 8px 12px; - color: var(--sv-muted); - background: var(--sv-card); - border-left: 3px solid var(--sv-accent); - border-radius: 4px; - font-size: 12px; - line-height: 1.5; -} -.gromlab-sprite-viewer__colors-title { margin: 0 0 8px; color: var(--sv-muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; } -.gromlab-sprite-viewer__color-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: 32px; margin-bottom: 6px; } -.gromlab-sprite-viewer__swatch { width: 26px; height: 26px; flex: 0 0 auto; padding: 0; border: 1px solid var(--sv-border); border-radius: 4px; cursor: pointer; } -.gromlab-sprite-viewer__color-label { min-width: 0; overflow-wrap: anywhere; color: var(--sv-muted); font: 12px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__color-popover { - position: absolute; - z-index: 5; - bottom: calc(100% + 6px); - left: 0; - width: 224px; - max-width: calc(100vw - 64px); - padding: 12px; - background: var(--sv-bg); - border: 1px solid var(--sv-border); - border-radius: 8px; - box-shadow: 0 8px 28px rgba(0, 0, 0, .22); -} -.gromlab-sprite-viewer__color-picker { display: flex; flex-direction: column; width: 198px; max-width: 100%; height: 160px; } -.gromlab-sprite-viewer__hex-input { display: block; width: 100%; margin-top: 8px; } -.gromlab-sprite-viewer__hex-input::part(input) { box-sizing: border-box; display: block; width: 100%; height: 32px; padding: 0 8px; color: var(--sv-text); text-align: center; background: var(--sv-card); border: 1px solid var(--sv-border); border-radius: 4px; outline: none; font: 12px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__hex-input::part(input):focus { border-color: var(--sv-accent); } -.gromlab-sprite-viewer__tabs { display: flex; overflow-x: auto; margin-bottom: 12px; border-bottom: 1px solid var(--sv-border); } -.gromlab-sprite-viewer__tab { flex: 0 0 auto; padding: 8px 16px; color: var(--sv-muted); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: 12px; font-weight: 600; } -.gromlab-sprite-viewer__tab[aria-selected="true"] { color: var(--sv-accent); border-bottom-color: var(--sv-accent); } -.gromlab-sprite-viewer__code { position: relative; overflow: hidden; background: var(--sv-code); border-radius: 8px; } -.gromlab-sprite-viewer__code pre { min-height: 72px; margin: 0; padding: 16px 70px 16px 16px; overflow-x: auto; font: 12px/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace; } -.gromlab-sprite-viewer__copy { position: absolute; top: 8px; right: 8px; padding: 4px 8px; color: var(--sv-muted); background: var(--sv-bg); border: 1px solid var(--sv-border); border-radius: 4px; cursor: pointer; font-size: 11px; } -.gromlab-sprite-viewer__copy:hover { color: var(--sv-text); } -.gromlab-sprite-viewer__code .hl-tag { color: #116329; } -.gromlab-sprite-viewer__code .hl-attr, -.gromlab-sprite-viewer__code .hl-number, -.gromlab-sprite-viewer__code .hl-property { color: #0550ae; } -.gromlab-sprite-viewer__code .hl-string, -.gromlab-sprite-viewer__code .hl-color { color: #0a3069; } -.gromlab-sprite-viewer__code .hl-comment { color: #8b949e; } -.gromlab-sprite-viewer__code .hl-punctuation, -.gromlab-sprite-viewer__code .hl-selector { color: #6639ba; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-tag { color: #7ee787; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-attr, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-number, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-property { color: #79c0ff; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-string, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-color { color: #a5d6ff; } -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-punctuation, -.gromlab-sprite-viewer[data-theme="dark"] .gromlab-sprite-viewer__code .hl-selector { color: #d2a8ff; } -@media (prefers-color-scheme: dark) { - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-tag { color: #7ee787; } - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-attr, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-number, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-property { color: #79c0ff; } - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-string, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-color { color: #a5d6ff; } - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-punctuation, - .gromlab-sprite-viewer:not([data-theme]) .gromlab-sprite-viewer__code .hl-selector { color: #d2a8ff; } -} -@media (max-width: 640px) { - .gromlab-sprite-viewer { padding: 16px; border-radius: 8px; } - .gromlab-sprite-viewer__header { align-items: stretch; } - .gromlab-sprite-viewer__toolbar { width: 100%; margin-left: 0; } - .gromlab-sprite-viewer__search { width: auto; flex: 1; min-width: 0; } - .gromlab-sprite-viewer__grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; } - .gromlab-sprite-viewer__icon-wrap, - .gromlab-sprite-viewer__icon { width: 104px; height: 104px; } - .gromlab-sprite-viewer__dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); } - .gromlab-sprite-viewer__dialog-shell { max-height: calc(100dvh - 20px); padding: 16px; } - .gromlab-sprite-viewer__dialog-preview { padding: 16px; } - .gromlab-sprite-viewer__dialog-preview-canvas, - .gromlab-sprite-viewer__dialog-icon, - .gromlab-sprite-viewer__dialog-img, - .gromlab-sprite-viewer__dialog-mask { width: min(256px, calc(100vw - 86px)); height: min(256px, calc(100vw - 86px)); } -} -@media (prefers-reduced-motion: reduce) { - .gromlab-sprite-viewer *, - .gromlab-sprite-viewer *::before, - .gromlab-sprite-viewer *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } -} -`,et="gromlab-sprite-viewer",be="gromlab-hex-color-picker",we="gromlab-hex-input",W;function Hr(){return customElements.get(be)&&customElements.get(we)?Promise.resolve():W||(W=Promise.all([Promise.resolve().then(()=>(Ft(),mt)),Promise.resolve().then(()=>(Wt(),_t))]).then(([{HexBase:e},{HexInputBase:t}])=>{customElements.get(be)||customElements.define(be,class extends e{}),customElements.get(we)||customElements.define(we,class extends t{})}),W)}function tt(e,t){const r=e%100,i=e%10,o=r>=11&&r<=19?t[2]:i===1?t[0]:i>=2&&i<=4?t[1]:t[2];return`${e} ${o}`}function Ur(){return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function rt(e,t){return Object.fromEntries(e.colors.map(({variable:r,fallback:i})=>[r,R(i,t)]))}var Nr=class extends U{static properties={sources:{attribute:!1},viewerTitle:{attribute:"viewer-title"},colorTheme:{attribute:"color-theme"},themeControlled:{attribute:!1},showThemeToggle:{attribute:!1},manifestUrl:{attribute:"manifest-url"},spriteUrl:{attribute:"sprite-url"},_manifests:{state:!0},_errors:{state:!0},_loading:{state:!0},_query:{state:!0},_systemTheme:{state:!0},_selected:{state:!0},_activeTab:{state:!0},_colors:{state:!0},_colorOverrides:{state:!0},_cssColor:{state:!0},_cssColorOverridden:{state:!0},_openColorControl:{state:!0},_copied:{state:!0}};static styles=wt(Pr);_loadVersion=0;_copyTimeout;_media;constructor(){super(),this.sources=[],this.viewerTitle="SVG Sprites",this.colorTheme="auto",this.themeControlled=!1,this.showThemeToggle=!0,this._manifests=[],this._errors=[],this._loading=!1,this._query="",this._systemTheme=Ur(),this._selected=null,this._activeTab="svg",this._colors={},this._colorOverrides={},this._cssColor="#1a1a1a",this._cssColorOverridden=!1,this._openColorControl=null,this._copied=!1}_handleMediaChange=()=>{this._systemTheme=this._media?.matches?"dark":"light",this._syncThemeColors()};_handleDocumentPointerDown=e=>{if(!this._openColorControl)return;e.composedPath().some(r=>r instanceof HTMLElement&&(r.dataset.colorTrigger===this._openColorControl||r.dataset.colorPopover===this._openColorControl))||(this._openColorControl=null)};connectedCallback(){super.connectedCallback(),Hr(),this._media=globalThis.matchMedia?.("(prefers-color-scheme: dark)"),this._systemTheme=this._media?.matches?"dark":"light",this._media?.addEventListener("change",this._handleMediaChange),globalThis.document?.addEventListener("pointerdown",this._handleDocumentPointerDown,!0)}disconnectedCallback(){this._media?.removeEventListener("change",this._handleMediaChange),globalThis.document?.removeEventListener("pointerdown",this._handleDocumentPointerDown,!0),this._copyTimeout&&clearTimeout(this._copyTimeout),super.disconnectedCallback()}updated(e){(e.has("sources")||e.has("manifestUrl")||e.has("spriteUrl"))&&this._loadSources(),e.has("colorTheme")&&this._syncThemeColors()}get _resolvedColorTheme(){return this.colorTheme==="auto"?this._systemTheme:this.colorTheme}get _themeColor(){return this._resolvedColorTheme==="dark"?"#e5e5e5":"#1a1a1a"}_effectiveSources(){const e=Xe(this.sources);return e.length>0?e:this.manifestUrl&&this.spriteUrl?[{manifestUrl:this.manifestUrl,spriteUrl:this.spriteUrl}]:[]}async _loadSources(){const e=++this._loadVersion,t=this._effectiveSources(),r=[],i=[],o=[];this.manifestUrl&&!this.spriteUrl&&Xe(this.sources).length===0&&o.push("The sprite-url attribute is required with manifest-url.");for(const n of t){if(typeof n=="function"||Dt(n)){i.push(n);continue}try{r.push(ee(n))}catch(l){o.push(l instanceof Error?l.message:String(l))}}if(this._manifests=r.sort(Qe),this._errors=o,this._loading=i.length>0,this._selected=null,i.length===0)return;const s=await Promise.allSettled(i.map(Or));if(e!==this._loadVersion)return;const a=[];for(const n of s)n.status==="fulfilled"?a.push(n.value):o.push(n.reason instanceof Error?n.reason.message:String(n.reason));this._manifests=[...r,...a].sort(Qe),this._errors=[...o],this._loading=!1}_syncThemeColors(){this._selected&&(this._colors={...rt(this._selected.icon,this._themeColor),...this._colorOverrides},this._cssColorOverridden||(this._cssColor=this._themeColor))}_toggleTheme(){const e=this._resolvedColorTheme==="dark"?"light":"dark";this.themeControlled||(this.colorTheme=e),this.dispatchEvent(new CustomEvent("color-theme-change",{bubbles:!0,composed:!0,detail:{theme:e}}))}async _selectIcon(e,t){const r=`${e.name}:${e.spriteUrl}:${t.id}`;this._selected={key:r,manifest:e,icon:t},this._activeTab=fe(e)[0]?.id??"svg",this._colorOverrides={},this._colors=rt(t,this._themeColor),this._cssColor=this._themeColor,this._cssColorOverridden=!1,this._openColorControl=null,this._copied=!1,await this.updateComplete;const i=this.renderRoot.querySelector("dialog");i&&!i.open&&i.showModal()}_closeDialog(){const e=this.renderRoot.querySelector("dialog");e?.open&&e.close(),this._selected=null,this._openColorControl=null}_handleBackdropClick(e){if(!(e.currentTarget instanceof HTMLDialogElement)||e.target!==e.currentTarget)return;const t=e.currentTarget.getBoundingClientRect();(e.clientXt.right||e.clientYt.bottom)&&this._closeDialog()}_handleTabKeyDown(e,t){if(!this._selected)return;const r=fe(this._selected.manifest);let i=null;if(e.key==="ArrowRight"&&(i=(t+1)%r.length),e.key==="ArrowLeft"&&(i=(t-1+r.length)%r.length),e.key==="Home"&&(i=0),e.key==="End"&&(i=r.length-1),i===null)return;e.preventDefault(),this._activeTab=r[i].id;const o=this.renderRoot.querySelectorAll('[role="tab"]');this.updateComplete.then(()=>o[i]?.focus())}_handleColorChange(e,t){const r=R(t);this._colors={...this._colors,[e]:r},this._colorOverrides={...this._colorOverrides,[e]:r}}_handleCssColorChange(e){this._cssColor=R(e),this._cssColorOverridden=!0}async _copyCode(e){if(globalThis.navigator?.clipboard)try{await globalThis.navigator.clipboard.writeText(e),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=setTimeout(()=>{this._copied=!1},1500)}catch{this._copied=!1}}_renderColorControl(e,t,r,i){const o=this._openColorControl===r,s=`color-${r.replace(/[^a-zA-Z0-9_-]/g,"-")}`;return p` -
- - ${e} - ${o?p` - - `:c} -
- `}_renderDialogPreview(e,t){const r=`${e.spriteUrl}#${t.id}`;return this._activeTab==="img"?p`${t.name}`:this._activeTab==="css"?p` - - `:p` - - - - `}_renderDialog(){if(!this._selected)return c;const{manifest:e,icon:t}=this._selected,r=fe(e),i=r.some(n=>n.id===this._activeTab)?this._activeTab:r[0].id,o=yr({manifest:e,icon:t,tab:i,colorOverrides:this._colorOverrides,cssColor:this._cssColor}),s=wr(t.viewBox),a=i!=="img"&&i!=="css";return p` - {n.preventDefault(),this._closeDialog()}} - @click=${this._handleBackdropClick} - > -
- - -
-
- ${this._renderDialogPreview(e,t)} -
-
- -
-

${t.name}

- ${s?p`${s}`:c} -
-

${e.name} · ${e.format} · ${e.target}

- -
- ${a&&t.colors.length>0?p` -

- Цвета применяются к превью через CSS-переменные и попадут в пример кода. -

-

CSS Variables

- ${t.colors.map(({variable:n,fallback:l})=>this._renderColorControl(`${n}: ${l}`,this._colors[n],n,g=>this._handleColorChange(n,g)))} - `:c} - ${a&&t.colors.length===0?p` -

У иконки нет настраиваемых цветовых переменных.

- `:c} - ${i==="img"?p` -

- IMG изолирует SVG: CSS-переменные и currentColor внутрь изображения не передаются. -

- `:c} - ${i==="css"?p` -

- CSS mask отображает иконку одним цветом через background-color. -

- ${this._renderColorControl("background-color",this._cssColor,"background-color",n=>this._handleCssColorChange(n))} - `:c} -
- -
- ${r.map((n,l)=>p` - - `)} -
- -
-
${_r(Sr(o.code,o.language))}
- -
-
-
- `}render(){const e=this._query.trim().toLowerCase(),t=this._manifests.map(o=>({manifest:o,icons:o.icons.filter(s=>e===""||s.name.toLowerCase().includes(e)||o.name.toLowerCase().includes(e))})).filter(o=>o.icons.length>0),r=this._manifests.reduce((o,s)=>o+s.iconCount,0),i=t.reduce((o,s)=>o+s.icons.length,0);return p` -
-
-

${this.viewerTitle}

- - ${tt(this._manifests.length,["спрайт","спрайта","спрайтов"])} - · ${tt(r,["иконка","иконки","иконок"])} - ${e?` · найдено ${i}`:c} - -
- {this._query=o.currentTarget.value}} - placeholder="Найти иконку" - aria-label="Поиск иконок" - > - ${this.showThemeToggle?p` - - `:c} -
-
- - ${this._errors.length>0?p` - - `:c} - - ${t.map(({manifest:o,icons:s})=>p` -
-
-

${o.name}

- ${o.format} - ${s.length} - ${o.description?p` -

${o.description}

- `:c} -
-
- ${s.map(a=>p` - - `)} -
-
- `)} - - ${t.length===0&&(!this._loading||this._manifests.length>0)?p` -
- ${this._manifests.length===0?"Спрайты не подключены":"Иконки не найдены"} -
- `:c} - ${this._loading&&this._manifests.length===0?p` -
Загрузка спрайтов...
- `:c} - - - - ${this._renderDialog()} -
- `}};function Dr(){customElements.get(et)||customElements.define(et,Nr)}Dr();/*! Bundled license information: - -@lit/reactive-element/css-tag.js: - (** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -@lit/reactive-element/reactive-element.js: -lit-html/lit-html.js: -lit-element/lit-element.js: -lit-html/directive.js: -lit-html/directives/unsafe-html.js: - (** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/is-server.js: - (** - * @license - * Copyright 2022 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) - -lit-html/directives/if-defined.js: -lit-html/directives/style-map.js: - (** - * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - *) -*/export{Dr as defineSpriteViewerElement}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/ssr/index.js b/integration/apps/solid-start-vite/.vinxi/build/ssr/index.js deleted file mode 100644 index 6178f9f..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/ssr/index.js +++ /dev/null @@ -1 +0,0 @@ -import"solid-js/web";import"solid-js";import{H as p}from"./assets/index-CV0w8CD4.js";export{p as default}; diff --git a/integration/apps/solid-start-vite/.vinxi/build/ssr/ssr.js b/integration/apps/solid-start-vite/.vinxi/build/ssr/ssr.js deleted file mode 100644 index 49bdf0d..0000000 --- a/integration/apps/solid-start-vite/.vinxi/build/ssr/ssr.js +++ /dev/null @@ -1 +0,0 @@ -import{ssrElement as K,escape as T,mergeProps as Ke,ssr as $,isServer as x,getRequestEvent as k,renderToString as ze,renderToStream as Ge,createComponent as R,delegateEvents as Je,ssrHydrationKey as q,useAssets as Ve,NoHydration as ye,Hydration as Xe,ssrAttribute as z,HydrationScript as Ye}from"solid-js/web";import{lazy as Qe,createComponent as we,sharedConfig as U,getOwner as ve,runWithOwner as Re,createMemo as P,createSignal as M,createRenderEffect as Ze,on as ne,useContext as et,createContext as be,startTransition as tt,resetErrorBoundaries as nt,batch as rt,untrack as Se,children as st,Show as Ee,createRoot as ot,onCleanup as re,Suspense as at,catchError as it,ErrorBoundary as ct}from"solid-js";import{provideRequestEvent as ut}from"solid-js/web/storage";import{H3Event as Y,setResponseStatus as lt,setHeader as ht,getRequestIP as dt,getResponseStatus as ft,getResponseStatusText as pt,getResponseHeader as mt,setResponseHeader as gt,removeResponseHeader as yt,appendResponseHeader as wt,getResponseHeaders as vt,getRequestURL as Rt,getRequestWebStream as bt,sendRedirect as St,getCookie as Et,setCookie as At,eventHandler as $t}from"h3";import{getContext as Pt}from"unctx";import{AsyncLocalStorage as Tt}from"node:async_hooks";import{createRouter as xt}from"radix3";function Ct(e){let t;const n=$e(e),s={duplex:"half",method:e.method,headers:e.headers};return e.node.req.body instanceof ArrayBuffer?new Request(n,{...s,body:e.node.req.body}):new Request(n,{...s,get body(){return t||(t=Mt(e),t)}})}function Lt(e){return e.web??={request:Ct(e),url:$e(e)},e.web.request}function Ht(){return Bt()}const Ae=Symbol("$HTTPEvent");function qt(e){return typeof e=="object"&&(e instanceof Y||e?.[Ae]instanceof Y||e?.__is_event__===!0)}function S(e){return function(...t){let n=t[0];if(qt(n))t[0]=n instanceof Y||n.__is_event__?n:n[Ae];else{if(!globalThis.app.config.server.experimental?.asyncContext)throw new Error("AsyncLocalStorage was not enabled. Use the `server.experimental.asyncContext: true` option in your app configuration to enable it. Or, pass the instance of HTTPEvent that you have as the first argument to the function.");if(n=Ht(),!n)throw new Error("No HTTPEvent found in AsyncLocalStorage. Make sure you are using the function within the server runtime.");t.unshift(n)}return e(...t)}}const $e=S(Rt),kt=S(dt),Q=S(lt),ue=S(ft),Ot=S(pt),G=S(vt),le=S(mt),Ft=S(gt),_t=S(wt),he=S(St),It=S(Et),Ut=S(At),jt=S(ht),Mt=S(bt),Nt=S(yt),Wt=S(Lt);function Dt(){return Pt("nitro-app",{asyncContext:!!globalThis.app.config.server.experimental?.asyncContext,AsyncLocalStorage:Tt})}function Bt(){return Dt().use().event}const Pe=[{page:!0,$component:{src:"src/routes/index.jsx?pick=default&pick=$css",build:()=>import("./index.js"),import:()=>import("./index.js")},path:"/",filePath:"/home/gromov/projects/my/svg-sprites/integration/apps/solid-start-vite/src/routes/index.jsx"}],Kt=zt(Pe.filter(e=>e.page));function zt(e){function t(n,s,r,o){const a=Object.values(n).find(i=>r.startsWith(i.id+"/"));return a?(t(a.children||(a.children=[]),s,r.slice(a.id.length)),n):(n.push({...s,id:r,path:r.replace(/\([^)/]+\)/g,"").replace(/\/+/g,"/")}),n)}return e.sort((n,s)=>n.path.length-s.path.length).reduce((n,s)=>t(n,s,s.path,s.path),[])}function Gt(e,t){const n=Vt.lookup(e);if(n&&n.route){const s=n.route,r=t==="HEAD"?s.$HEAD||s.$GET:s[`$${t}`];if(r===void 0)return;const o=s.page===!0&&s.$component!==void 0;return{handler:r,params:n.params,isPage:o}}}function Jt(e){return e.$HEAD||e.$GET||e.$POST||e.$PUT||e.$PATCH||e.$DELETE}const Vt=xt({routes:Pe.reduce((e,t)=>{if(!Jt(t))return e;let n=t.path.replace(/\([^)/]+\)/g,"").replace(/\/+/g,"/").replace(/\*([^/]*)/g,(s,r)=>`**:${r}`).split("/").map(s=>s.startsWith(":")||s.startsWith("*")?s:encodeURIComponent(s)).join("/");if(/:[^/]*\?/g.test(n))throw new Error(`Optional parameters are not supported in API routes: ${n}`);if(e[n])throw new Error(`Duplicate API routes for "${n}" found at "${e[n].route.path}" and "${t.path}"`);return e[n]={route:t},e},{})}),V="solidFetchEvent";function Xt(e){return{request:Wt(e),response:Zt(e),clientAddress:kt(e),locals:{},nativeEvent:e}}function Yt(e){if(!e.context[V]){const t=Xt(e);e.context[V]=t}return e.context[V]}class Qt{event;constructor(t){this.event=t}get(t){const n=le(this.event,t);return Array.isArray(n)?n.join(", "):n||null}has(t){return this.get(t)!==null}set(t,n){return Ft(this.event,t,n)}delete(t){return Nt(this.event,t)}append(t,n){_t(this.event,t,n)}getSetCookie(){const t=le(this.event,"Set-Cookie");return Array.isArray(t)?t:[t]}forEach(t){return Object.entries(G(this.event)).forEach(([n,s])=>t(Array.isArray(s)?s.join(", "):s,n,this))}entries(){return Object.entries(G(this.event)).map(([t,n])=>[t,Array.isArray(n)?n.join(", "):n])[Symbol.iterator]()}keys(){return Object.keys(G(this.event))[Symbol.iterator]()}values(){return Object.values(G(this.event)).map(t=>Array.isArray(t)?t.join(", "):t)[Symbol.iterator]()}[Symbol.iterator](){return this.entries()[Symbol.iterator]()}}function Zt(e){return{get status(){return ue(e)},set status(t){Q(e,t)},get statusText(){return Ot(e)},set statusText(t){Q(e,ue(e),t)},headers:new Qt(e)}}function en(e){e.forEach(t=>{if(!t.attrs.href)return;let n=document.head.querySelector(`link[href="${t.attrs.href}"]`);n||(n=document.createElement("link"),n.setAttribute("rel","preload"),n.setAttribute("as","style"),n.setAttribute("href",t.attrs.href),document.head.appendChild(n))})}var tn=" ";const nn={style:e=>K("style",e.attrs,()=>e.children,!0),link:e=>K("link",e.attrs,void 0,!0),script:e=>e.attrs.src?K("script",Ke(()=>e.attrs,{get id(){return e.key}}),()=>$(tn),!0):null,noscript:e=>K("noscript",e.attrs,()=>T(e.children),!0)};function Z(e,t){let{tag:n,attrs:{key:s,...r}={key:void 0},children:o}=e;return nn[n]({attrs:{...r,nonce:t},key:s,children:o})}function rn(e,t,n,s="default"){return Qe(async()=>{{const o=(await e.import())[s],i=(await t.inputs?.[e.src].assets()).filter(u=>u.tag==="style"||u.attrs.rel==="stylesheet");return typeof window<"u"&&en(i),{default:u=>[...i.map(h=>Z(h)),we(o,u)]}}})}function Te(){function e(n){return{...n,...n.$$route?n.$$route.require().route:void 0,info:{...n.$$route?n.$$route.require().route.info:{},filesystem:!0},component:n.$component&&rn(n.$component,globalThis.MANIFEST.client,globalThis.MANIFEST.ssr),children:n.children?n.children.map(e):void 0}}return Kt.map(e)}let de;const sn=x?()=>k().routes:()=>de||(de=Te());function on(e){const t=It(e.nativeEvent,"flash");if(t)try{let n=JSON.parse(t);if(!n||!n.result)return;const s=[...n.input.slice(0,-1),new Map(n.input[n.input.length-1])],r=n.error?new Error(n.result):n.result;return{input:s,url:n.url,pending:!1,result:n.thrown?void 0:r,error:n.thrown?r:void 0}}catch(n){console.error(n)}finally{Ut(e.nativeEvent,"flash","",{maxAge:0})}}async function an(e){const t=globalThis.MANIFEST.client;return globalThis.MANIFEST.ssr,e.response.headers.set("Content-Type","text/html"),Object.assign(e,{manifest:await t.json(),assets:[...await t.inputs[t.handler].assets()],router:{submission:on(e)},routes:Te(),complete:!1,$islands:new Set})}const cn=new Set([301,302,303,307,308]);function ee(e){return e.status&&cn.has(e.status)?e.status:302}function un(e,t,n={},s){return $t({handler:r=>{const o=Yt(r);return ut(o,async()=>{const a=Gt(new URL(o.request.url).pathname,o.request.method);if(a){const d=await a.handler.import(),g=o.request.method==="HEAD"?d.HEAD||d.GET:d[o.request.method];o.params=a.params||{},U.context={event:o};const l=await g(o);if(l!==void 0)return l;if(o.request.method!=="GET")throw new Error(`API handler for ${o.request.method} "${o.request.url}" did not return a response.`);if(!a.isPage)return}const i=await t(o),c=typeof n=="function"?await n(i):{...n},u=c.mode||"stream";if(c.nonce&&(i.nonce=c.nonce),u==="sync"){const d=ze(()=>(U.context.event=i,e(i)),c);if(i.complete=!0,i.response&&i.response.headers.get("Location")){const g=ee(i.response);return he(r,i.response.headers.get("Location"),g)}return d}if(c.onCompleteAll){const d=c.onCompleteAll;c.onCompleteAll=g=>{pe(i)(g),d(g)}}else c.onCompleteAll=pe(i);if(c.onCompleteShell){const d=c.onCompleteShell;c.onCompleteShell=g=>{fe(i,r)(),d(g)}}else c.onCompleteShell=fe(i,r);const h=Ge(()=>(U.context.event=i,e(i)),c);if(i.response&&i.response.headers.get("Location")){const d=ee(i.response);return he(r,i.response.headers.get("Location"),d)}if(u==="async")return h;const{writable:w,readable:m}=new TransformStream;return h.pipeTo(w),m})}})}function fe(e,t){return()=>{if(e.response&&e.response.headers.get("Location")){const n=ee(e.response);Q(t,n),jt(t,"Location",e.response.headers.get("Location"))}}}function pe(e){return({write:t})=>{e.complete=!0;const n=e.response&&e.response.headers.get("Location");n&&t(`