@bedrock-layout/solid 0.3.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs.js +169 -3
- package/lib/index.d.ts +94 -1
- package/lib/index.m.js +337 -6
- package/lib/index.umd.js +169 -3
- package/package.json +2 -2
package/lib/index.cjs.js
CHANGED
|
@@ -1,5 +1,171 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";let re={data:""},oe=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||re,fe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ce=/\/\*[^]*?\*\/|\s\s+|\n/g,w=(e,t)=>{let n="",s="",l="";for(let i in e){let o=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+o+";":s+=i[1]=="f"?w(o,i):i+"{"+w(o,i[1]=="k"?"":t)+"}":typeof o=="object"?s+=w(o,t?t.replace(/([^,])+/g,r=>i.replace(/(^:.*)|([^,])+/g,f=>/&/.test(f)?f.replace(/&/g,r):r?r+" "+f:f)):i):o!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=w.p?w.p(i,o):i+":"+o+";")}return n+(t&&l?t+"{"+l+"}":l)+s},S={},Y=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Y(e[n]);return t}return e},ue=(e,t,n,s,l)=>{let i=Y(e),o=S[i]||(S[i]=(r=>{let f=0,c=11;for(;f<r.length;)c=101*c+r.charCodeAt(f++)>>>0;return"go"+c})(i));if(!S[o]){let r=i!==e?e:(f=>{let c,u=[{}];for(;c=fe.exec(f.replace(ce,""));)c[4]?u.shift():c[3]?u.unshift(u[0][c[3]]=u[0][c[3]]||{}):u[0][c[1]]=c[2];return u[0]})(e);S[o]=w(l?{["@keyframes "+o]:r}:r,n?"":"."+o)}return((r,f,c)=>{f.data.indexOf(r)==-1&&(f.data=c?r+f.data:f.data+r)})(S[o],t,s),o},ae=(e,t,n)=>e.reduce((s,l,i)=>{let o=t[i];if(o&&o.call){let r=o(n),f=r&&r.props&&r.props.className||/^go/.test(r)&&r;o=f?"."+f:r&&typeof r=="object"?r.props?"":w(r,""):r===!1?"":r}return s+l+(o==null?"":o)},"");function P(e){let t=this||{},n=e.call?e(t.p):e;return ue(n.unshift?n.raw?ae(n,[].slice.call(arguments,1),t.p):n.reduce((s,l)=>Object.assign(s,l&&l.call?l(t.p):l),{}):n,oe(t.target),t.g,t.o,t.k)}P.bind({g:1});P.bind({k:1});const he=(e,t)=>e===t,ge=Symbol("solid-proxy"),q={equals:he};let de=ee;const L={},m=1,M=2,pe={owned:null,cleanups:null,context:null,owner:null};var d=null;let N=null,a=null,A=null,h=null,y=null,B=0;function ye(e,t,n){const s=F(e,t,!0,m);E(s)}function C(e,t,n){const s=F(e,t,!1,m);E(s)}function U(e,t,n){n=n?Object.assign({},q,n):q;const s=F(e,t,!0,0);return s.pending=L,s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,E(s),Se.bind(s)}function me(e){if(A)return e();let t;const n=A=[];try{t=e()}finally{A=null}return z(()=>{for(let s=0;s<n.length;s+=1){const l=n[s];if(l.pending!==L){const i=l.pending;l.pending=L,Z(l,i)}}},!1),t}function _(e){let t,n=a;return a=null,t=e(),a=n,t}function we(e){const t=Symbol("context");return{id:t,Provider:Ne(t),defaultValue:e}}function be(e){return ie(d,e.id)||e.defaultValue}function xe(e){const t=U(e);return U(()=>j(t()))}function Se(){const e=N;if(this.sources&&(this.state||e)){const t=h;h=null,this.state===m||e?E(this):I(this),h=t}if(a){const t=this.observers?this.observers.length:0;a.sources?(a.sources.push(this),a.sourceSlots.push(t)):(a.sources=[this],a.sourceSlots=[t]),this.observers?(this.observers.push(a),this.observerSlots.push(a.sources.length-1)):(this.observers=[a],this.observerSlots=[a.sources.length-1])}return this.value}function Z(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(A)return e.pending===L&&A.push(e),e.pending=t,t;let s=!1;return e.value=t,e.observers&&e.observers.length&&z(()=>{for(let l=0;l<e.observers.length;l+=1){const i=e.observers[l];s&&N.disposed.has(i),i.pure?h.push(i):y.push(i),i.observers&&(s&&!i.tState||!s&&!i.state)&&te(i),s||(i.state=m)}if(h.length>1e6)throw h=[],new Error},!1),t}function E(e){if(!e.fn)return;ne(e);const t=d,n=a,s=B;a=d=e,Ae(e,e.value,s),a=n,d=t}function Ae(e,t,n){let s;try{s=e.fn(t)}catch(l){se(l)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?Z(e,s):e.value=s,e.updatedAt=n)}function F(e,t,n,s=m,l){const i={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:d,context:null,pure:n};return d===null||d!==pe&&(d.owned?d.owned.push(i):d.owned=[i]),i}function J(e){const t=N;if(e.state!==m)return e.state=0;if(e.suspense&&_(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<B);)(e.state||t)&&n.push(e);for(let s=n.length-1;s>=0;s--)if(e=n[s],e.state===m||t)E(e);else if(e.state===M||t){const l=h;h=null,I(e,n[0]),h=l}}function z(e,t){if(h)return e();let n=!1;t||(h=[]),y?n=!0:y=[],B++;try{return e()}catch(s){se(s)}finally{Ce(n)}}function Ce(e){h&&(ee(h),h=null),!e&&(y.length?me(()=>{de(y),y=null}):y=null)}function ee(e){for(let t=0;t<e.length;t++)J(e[t])}function I(e,t){e.state=0;const n=N;for(let s=0;s<e.sources.length;s+=1){const l=e.sources[s];l.sources&&(l.state===m||n?l!==t&&J(l):(l.state===M||n)&&I(l,t))}}function te(e){const t=N;for(let n=0;n<e.observers.length;n+=1){const s=e.observers[n];(!s.state||t)&&(s.state=M,s.pure?h.push(s):y.push(s),s.observers&&te(s))}}function ne(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const i=l.pop(),o=n.observerSlots.pop();s<l.length&&(i.sourceSlots[o]=s,l[s]=i,n.observerSlots[s]=o)}}if(e.owned){for(t=0;t<e.owned.length;t++)ne(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function se(e){throw e}function ie(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&ie(e.owner,t))}function j(e){if(typeof e=="function"&&!e.length)return j(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=j(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Ne(e){return function(n){let s;return ye(()=>s=_(()=>(d.context={[e]:n.value},xe(()=>n.children)))),s}}function T(){return!0}const le={get(e,t,n){return t===ge?n:e.get(t)},has(e,t){return e.has(t)},set:T,deleteProperty:T,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:T,deleteProperty:T}},ownKeys(e){return e.keys()}};function k(e){return typeof e=="function"?e():e}function X(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const s=k(e[n])[t];if(s!==void 0)return s}},has(t){for(let n=e.length-1;n>=0;n--)if(t in k(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(k(e[n])));return[...new Set(t)]}},le)}function K(e,...t){const n=new Set(t.flat()),s=Object.getOwnPropertyDescriptors(e),l=t.map(i=>{const o={};for(let r=0;r<i.length;r++){const f=i[r];Object.defineProperty(o,f,s[f]?s[f]:{get(){return e[f]},set(){return!0}})}return o});return l.push(new Proxy({get(i){return n.has(i)?void 0:e[i]},has(i){return n.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!n.has(i))}},le)),l}const Ee=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Te=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Ee]),Pe=new Set(["innerHTML","textContent","innerText","children"]),Le={className:"class",htmlFor:"for"},V={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},Oe=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),$e={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function ke(e,t,n){let s=n.length,l=t.length,i=s,o=0,r=0,f=t[l-1].nextSibling,c=null;for(;o<l||r<i;){if(t[o]===n[r]){o++,r++;continue}for(;t[l-1]===n[i-1];)l--,i--;if(l===o){const u=i<s?r?n[r-1].nextSibling:n[i-r]:f;for(;r<i;)e.insertBefore(n[r++],u)}else if(i===r)for(;o<l;)(!c||!c.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[i-1]&&n[r]===t[l-1]){const u=t[--l].nextSibling;e.insertBefore(n[r++],t[o++].nextSibling),e.insertBefore(n[--i],u),t[l]=n[i]}else{if(!c){c=new Map;let g=r;for(;g<i;)c.set(n[g],g++)}const u=c.get(t[o]);if(u!=null)if(r<u&&u<i){let g=o,p=1,x;for(;++g<l&&g<i&&!((x=c.get(t[g]))==null||x!==u+p);)p++;if(p>u-r){const $=t[o];for(;r<u;)e.insertBefore(n[r++],$)}else e.replaceChild(n[r++],t[o++])}else o++;else t[o++].remove()}}}const H="_$DX_DELEGATE";function je(e,t=window.document){const n=t[H]||(t[H]=new Set);for(let s=0,l=e.length;s<l;s++){const i=e[s];n.has(i)||(n.add(i),t.addEventListener(i,Ue))}}function ve(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function De(e,t,n,s){s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s)}function Me(e,t,n,s){s?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,l=>n[0](n[1],l)):e.addEventListener(t,n)}function Be(e,t,n={}){const s=Object.keys(t||{}),l=Object.keys(n);let i,o;for(i=0,o=l.length;i<o;i++){const r=l[i];!r||r==="undefined"||t[r]||(R(e,r,!1),delete n[r])}for(i=0,o=s.length;i<o;i++){const r=s[i],f=!!t[r];!r||r==="undefined"||n[r]===f||!f||(R(e,r,!0),n[r]=f)}return n}function _e(e,t,n={}){const s=e.style;if(t==null||typeof t=="string")return s.cssText=t;typeof n=="string"&&(n={});let l,i;for(i in n)t[i]==null&&s.removeProperty(i),delete n[i];for(i in t)l=t[i],l!==n[i]&&(s.setProperty(i,l),n[i]=l);return n}function Fe(e,t,n,s){typeof t=="function"?C(l=>Q(e,t(),l,n,s)):Q(e,t,void 0,n,s)}function Ie(e,t,n,s,l={}){for(const i in l)if(!(i in t)){if(i==="children")continue;G(e,i,null,l[i],n)}for(const i in t){if(i==="children"){s||O(e,t.children);continue}const o=t[i];l[i]=G(e,i,o,l[i],n)}}function qe(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function R(e,t,n){const s=t.trim().split(/\s+/);for(let l=0,i=s.length;l<i;l++)e.classList.toggle(s[l],n)}function G(e,t,n,s,l){let i,o,r;if(t==="style")return _e(e,n,s);if(t==="classList")return Be(e,n,s);if(n===s)return s;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),c=Oe.has(f);Me(e,f,n,c),c&&je([f])}else if((r=Pe.has(t))||!l&&(V[t]||(o=Te.has(t)))||(i=e.nodeName.includes("-")))i&&!o&&!r?e[qe(t)]=n:e[V[t]||t]=n;else{const f=l&&t.indexOf(":")>-1&&$e[t.split(":")[0]];f?De(e,f,t,n):ve(e,Le[t]||t,n)}return n}function Ue(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const s=n[t];if(s&&!n.disabled){const l=n[`${t}Data`];if(l!==void 0?s(l,e):s(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function Q(e,t,n={},s,l){return!l&&"children"in t&&C(()=>n.children=O(e,t.children,n.children)),C(()=>Ie(e,t,s,!0,n)),n}function O(e,t,n,s,l){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,o=s!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(t=t.toString()),o){let r=n[0];r&&r.nodeType===3?r.data=t:r=document.createTextNode(t),n=b(e,n,s,r)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||i==="boolean")n=b(e,n,s);else{if(i==="function")return C(()=>{let r=t();for(;typeof r=="function";)r=r();n=O(e,r,n,s)}),()=>n;if(Array.isArray(t)){const r=[];if(v(r,t,l))return C(()=>n=O(e,r,n,s,!0)),()=>n;if(r.length===0){if(n=b(e,n,s),o)return n}else Array.isArray(n)?n.length===0?W(e,r,s):ke(e,n,r):(n&&b(e),W(e,r));n=r}else if(t instanceof Node){if(Array.isArray(n)){if(o)return n=b(e,n,s,t);b(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function v(e,t,n){let s=!1;for(let l=0,i=t.length;l<i;l++){let o=t[l],r;if(o instanceof Node)e.push(o);else if(!(o==null||o===!0||o===!1))if(Array.isArray(o))s=v(e,o)||s;else if((r=typeof o)=="string")e.push(document.createTextNode(o));else if(r==="function")if(n){for(;typeof o=="function";)o=o();s=v(e,Array.isArray(o)?o:[o])||s}else e.push(o),s=!0;else e.push(document.createTextNode(o.toString()))}return s}function W(e,t,n){for(let s=0,l=t.length;s<l;s++)e.insertBefore(t[s],n)}function b(e,t,n,s){if(n===void 0)return e.textContent="";const l=s||document.createTextNode("");if(t.length){let i=!1;for(let o=t.length-1;o>=0;o--){const r=t[o];if(l!==r){const f=r.parentNode===e;!i&&!o?f?e.replaceChild(l,r):e.insertBefore(l,n):f&&r.remove()}else i=!0}}else e.insertBefore(l,n);return[l]}function Xe(e,...t){}const Ke=!1,Ve=we();function He(e){let t=this||{};return(...n)=>{const s=l=>{const i=be(Ve),o=X(l,{theme:i}),r=X(o,{get className(){const p=o.className,x="className"in o&&/^go[0-9]+/.test(p);let $=P.apply({target:t.target,o:x,p:o,g:t.g},n);return[p,$].filter(Boolean).join(" ")}}),[f,c]=K(r,["as"]),u=f.as||e;let g;if(typeof u=="function")g=u(c);else if(Ke){const[p,x]=K(c,["children"]);g=Xe([`<${u} `,">",`</${u}>`],void 0,p.children||"")}else g=document.createElement(u),Fe(g,c);return g};return s.className=l=>_(()=>P.apply({target:t.target,p:l,g:t.g},n)),s}}function Re(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const D={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"},Ge=He("div")`
|
|
1
|
+
"use strict";var ye=Object.defineProperty,me=Object.defineProperties;var xe=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable;var K=(e,t,n)=>t in e?ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I=(e,t)=>{for(var n in t||(t={}))be.call(t,n)&&K(e,n,t[n]);if(X)for(var n of X(t))we.call(t,n)&&K(e,n,t[n]);return e},D=(e,t)=>me(e,xe(t));Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";let Se={data:""},$e=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Se,Ae=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Ce=/\/\*[^]*?\*\/|\s\s+|\n/g,b=(e,t)=>{let n="",i="",r="";for(let s in e){let l=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+l+";":i+=s[1]=="f"?b(l,s):s+"{"+b(l,s[1]=="k"?"":t)+"}":typeof l=="object"?i+=b(l,t?t.replace(/([^,])+/g,o=>s.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,o):o?o+" "+c:c)):s):l!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=b.p?b.p(s,l):s+":"+l+";")}return n+(t&&r?t+"{"+r+"}":r)+i},C={},re=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+re(e[n]);return t}return e},ve=(e,t,n,i,r)=>{let s=re(e),l=C[s]||(C[s]=(o=>{let c=0,a=11;for(;c<o.length;)a=101*a+o.charCodeAt(c++)>>>0;return"go"+a})(s));if(!C[l]){let o=s!==e?e:(c=>{let a,u=[{}];for(;a=Ae.exec(c.replace(Ce,""));)a[4]?u.shift():a[3]?u.unshift(u[0][a[3]]=u[0][a[3]]||{}):u[0][a[1]]=a[2];return u[0]})(e);C[l]=b(r?{["@keyframes "+l]:o}:o,n?"":"."+l)}return((o,c,a)=>{c.data.indexOf(o)==-1&&(c.data=a?o+c.data:c.data+o)})(C[l],t,i),l},ke=(e,t,n)=>e.reduce((i,r,s)=>{let l=t[s];if(l&&l.call){let o=l(n),c=o&&o.props&&o.props.className||/^go/.test(o)&&o;l=c?"."+c:o&&typeof o=="object"?o.props?"":b(o,""):o===!1?"":o}return i+r+(l==null?"":l)},"");function w(e){let t=this||{},n=e.call?e(t.p):e;return ve(n.unshift?n.raw?ke(n,[].slice.call(arguments,1),t.p):n.reduce((i,r)=>Object.assign(i,r&&r.call?r(t.p):r),{}):n,$e(t.target),t.g,t.o,t.k)}w.bind({g:1});w.bind({k:1});const Ee=(e,t)=>e===t,Ne=Symbol("solid-proxy"),G={equals:Ee};let je=ae;const O={},m=1,z=2,Pe={owned:null,cleanups:null,context:null,owner:null};var h=null;let E=null,f=null,v=null,g=null,y=null,V=0;function Oe(e,t,n){const i=_(e,t,!0,m);N(i)}function k(e,t,n){const i=_(e,t,!1,m);N(i)}function H(e,t,n){n=n?Object.assign({},G,n):G;const i=_(e,t,!0,0);return i.pending=O,i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,N(i),Me.bind(i)}function Te(e){if(v)return e();let t;const n=v=[];try{t=e()}finally{v=null}return ce(()=>{for(let i=0;i<n.length;i+=1){const r=n[i];if(r.pending!==O){const s=r.pending;r.pending=O,le(r,s)}}},!1),t}function W(e){let t,n=f;return f=null,t=e(),f=n,t}function Le(e){const t=Symbol("context");return{id:t,Provider:Re(t),defaultValue:e}}function Ie(e){return de(h,e.id)||e.defaultValue}function De(e){const t=H(e);return H(()=>F(t()))}function Me(){const e=E;if(this.sources&&(this.state||e)){const t=g;g=null,this.state===m||e?N(this):q(this),g=t}if(f){const t=this.observers?this.observers.length:0;f.sources?(f.sources.push(this),f.sourceSlots.push(t)):(f.sources=[this],f.sourceSlots=[t]),this.observers?(this.observers.push(f),this.observerSlots.push(f.sources.length-1)):(this.observers=[f],this.observerSlots=[f.sources.length-1])}return this.value}function le(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(v)return e.pending===O&&v.push(e),e.pending=t,t;let i=!1;return e.value=t,e.observers&&e.observers.length&&ce(()=>{for(let r=0;r<e.observers.length;r+=1){const s=e.observers[r];i&&E.disposed.has(s),s.pure?g.push(s):y.push(s),s.observers&&(i&&!s.tState||!i&&!s.state)&&ue(s),i||(s.state=m)}if(g.length>1e6)throw g=[],new Error},!1),t}function N(e){if(!e.fn)return;fe(e);const t=h,n=f,i=V;f=h=e,Be(e,e.value,i),f=n,h=t}function Be(e,t,n){let i;try{i=e.fn(t)}catch(r){ge(r)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?le(e,i):e.value=i,e.updatedAt=n)}function _(e,t,n,i=m,r){const s={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:null,pure:n};return h===null||h!==Pe&&(h.owned?h.owned.push(s):h.owned=[s]),s}function oe(e){const t=E;if(e.state!==m)return e.state=0;if(e.suspense&&W(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<V);)(e.state||t)&&n.push(e);for(let i=n.length-1;i>=0;i--)if(e=n[i],e.state===m||t)N(e);else if(e.state===z||t){const r=g;g=null,q(e,n[0]),g=r}}function ce(e,t){if(g)return e();let n=!1;t||(g=[]),y?n=!0:y=[],V++;try{return e()}catch(i){ge(i)}finally{Fe(n)}}function Fe(e){g&&(ae(g),g=null),!e&&(y.length?Te(()=>{je(y),y=null}):y=null)}function ae(e){for(let t=0;t<e.length;t++)oe(e[t])}function q(e,t){e.state=0;const n=E;for(let i=0;i<e.sources.length;i+=1){const r=e.sources[i];r.sources&&(r.state===m||n?r!==t&&oe(r):(r.state===z||n)&&q(r,t))}}function ue(e){const t=E;for(let n=0;n<e.observers.length;n+=1){const i=e.observers[n];(!i.state||t)&&(i.state=z,i.pure?g.push(i):y.push(i),i.observers&&ue(i))}}function fe(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),i=e.sourceSlots.pop(),r=n.observers;if(r&&r.length){const s=r.pop(),l=n.observerSlots.pop();i<r.length&&(s.sourceSlots[l]=i,r[i]=s,n.observerSlots[i]=l)}}if(e.owned){for(t=0;t<e.owned.length;t++)fe(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function ge(e){throw e}function de(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&de(e.owner,t))}function F(e){if(typeof e=="function"&&!e.length)return F(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=F(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function Re(e){return function(n){let i;return Oe(()=>i=W(()=>(h.context={[e]:n.value},De(()=>n.children)))),i}}function j(){return!0}const he={get(e,t,n){return t===Ne?n:e.get(t)},has(e,t){return e.has(t)},set:j,deleteProperty:j,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:j,deleteProperty:j}},ownKeys(e){return e.keys()}};function M(e){return typeof e=="function"?e():e}function Q(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const i=M(e[n])[t];if(i!==void 0)return i}},has(t){for(let n=e.length-1;n>=0;n--)if(t in M(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(M(e[n])));return[...new Set(t)]}},he)}function Y(e,...t){const n=new Set(t.flat()),i=Object.getOwnPropertyDescriptors(e),r=t.map(s=>{const l={};for(let o=0;o<s.length;o++){const c=s[o];Object.defineProperty(l,c,i[c]?i[c]:{get(){return e[c]},set(){return!0}})}return l});return r.push(new Proxy({get(s){return n.has(s)?void 0:e[s]},has(s){return n.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!n.has(s))}},he)),r}const ze=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Ve=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...ze]),We=new Set(["innerHTML","textContent","innerText","children"]),_e={className:"class",htmlFor:"for"},Z={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},qe=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ue={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Xe(e,t,n){let i=n.length,r=t.length,s=i,l=0,o=0,c=t[r-1].nextSibling,a=null;for(;l<r||o<s;){if(t[l]===n[o]){l++,o++;continue}for(;t[r-1]===n[s-1];)r--,s--;if(r===l){const u=s<i?o?n[o-1].nextSibling:n[s-o]:c;for(;o<s;)e.insertBefore(n[o++],u)}else if(s===o)for(;l<r;)(!a||!a.has(t[l]))&&t[l].remove(),l++;else if(t[l]===n[s-1]&&n[o]===t[r-1]){const u=t[--r].nextSibling;e.insertBefore(n[o++],t[l++].nextSibling),e.insertBefore(n[--s],u),t[r]=n[s]}else{if(!a){a=new Map;let d=o;for(;d<s;)a.set(n[d],d++)}const u=a.get(t[l]);if(u!=null)if(o<u&&u<s){let d=l,p=1,A;for(;++d<r&&d<s&&!((A=a.get(t[d]))==null||A!==u+p);)p++;if(p>u-o){const L=t[l];for(;o<u;)e.insertBefore(n[o++],L)}else e.replaceChild(n[o++],t[l++])}else l++;else t[l++].remove()}}}const J="_$DX_DELEGATE";function Ke(e,t=window.document){const n=t[J]||(t[J]=new Set);for(let i=0,r=e.length;i<r;i++){const s=e[i];n.has(s)||(n.add(s),t.addEventListener(s,nt))}}function Ge(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function He(e,t,n,i){i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i)}function Qe(e,t,n,i){i?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,r=>n[0](n[1],r)):e.addEventListener(t,n)}function Ye(e,t,n={}){const i=Object.keys(t||{}),r=Object.keys(n);let s,l;for(s=0,l=r.length;s<l;s++){const o=r[s];!o||o==="undefined"||t[o]||(ee(e,o,!1),delete n[o])}for(s=0,l=i.length;s<l;s++){const o=i[s],c=!!t[o];!o||o==="undefined"||n[o]===c||!c||(ee(e,o,!0),n[o]=c)}return n}function Ze(e,t,n={}){const i=e.style;if(t==null||typeof t=="string")return i.cssText=t;typeof n=="string"&&(n={});let r,s;for(s in n)t[s]==null&&i.removeProperty(s),delete n[s];for(s in t)r=t[s],r!==n[s]&&(i.setProperty(s,r),n[s]=r);return n}function Je(e,t,n,i){typeof t=="function"?k(r=>ne(e,t(),r,n,i)):ne(e,t,void 0,n,i)}function et(e,t,n,i,r={}){for(const s in r)if(!(s in t)){if(s==="children")continue;te(e,s,null,r[s],n)}for(const s in t){if(s==="children"){i||T(e,t.children);continue}const l=t[s];r[s]=te(e,s,l,r[s],n)}}function tt(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function ee(e,t,n){const i=t.trim().split(/\s+/);for(let r=0,s=i.length;r<s;r++)e.classList.toggle(i[r],n)}function te(e,t,n,i,r){let s,l,o;if(t==="style")return Ze(e,n,i);if(t==="classList")return Ye(e,n,i);if(n===i)return i;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const c=t.slice(2).toLowerCase(),a=qe.has(c);Qe(e,c,n,a),a&&Ke([c])}else if((o=We.has(t))||!r&&(Z[t]||(l=Ve.has(t)))||(s=e.nodeName.includes("-")))s&&!l&&!o?e[tt(t)]=n:e[Z[t]||t]=n;else{const c=r&&t.indexOf(":")>-1&&Ue[t.split(":")[0]];c?He(e,c,t,n):Ge(e,_e[t]||t,n)}return n}function nt(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const i=n[t];if(i&&!n.disabled){const r=n[`${t}Data`];if(r!==void 0?i(r,e):i(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function ne(e,t,n={},i,r){return!r&&"children"in t&&k(()=>n.children=T(e,t.children,n.children)),k(()=>et(e,t,i,!0,n)),n}function T(e,t,n,i,r){for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,l=i!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,s==="string"||s==="number")if(s==="number"&&(t=t.toString()),l){let o=n[0];o&&o.nodeType===3?o.data=t:o=document.createTextNode(t),n=$(e,n,i,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||s==="boolean")n=$(e,n,i);else{if(s==="function")return k(()=>{let o=t();for(;typeof o=="function";)o=o();n=T(e,o,n,i)}),()=>n;if(Array.isArray(t)){const o=[];if(R(o,t,r))return k(()=>n=T(e,o,n,i,!0)),()=>n;if(o.length===0){if(n=$(e,n,i),l)return n}else Array.isArray(n)?n.length===0?ie(e,o,i):Xe(e,n,o):(n&&$(e),ie(e,o));n=o}else if(t instanceof Node){if(Array.isArray(n)){if(l)return n=$(e,n,i,t);$(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function R(e,t,n){let i=!1;for(let r=0,s=t.length;r<s;r++){let l=t[r],o;if(l instanceof Node)e.push(l);else if(!(l==null||l===!0||l===!1))if(Array.isArray(l))i=R(e,l)||i;else if((o=typeof l)=="string")e.push(document.createTextNode(l));else if(o==="function")if(n){for(;typeof l=="function";)l=l();i=R(e,Array.isArray(l)?l:[l])||i}else e.push(l),i=!0;else e.push(document.createTextNode(l.toString()))}return i}function ie(e,t,n){for(let i=0,r=t.length;i<r;i++)e.insertBefore(t[i],n)}function $(e,t,n,i){if(n===void 0)return e.textContent="";const r=i||document.createTextNode("");if(t.length){let s=!1;for(let l=t.length-1;l>=0;l--){const o=t[l];if(r!==o){const c=o.parentNode===e;!s&&!l?c?e.replaceChild(r,o):e.insertBefore(r,n):c&&o.remove()}else s=!0}}else e.insertBefore(r,n);return[r]}function it(e,...t){}const st=!1,rt=Le();function lt(e){let t=this||{};return(...n)=>{const i=r=>{const s=Ie(rt),l=Q(r,{theme:s}),o=Q(l,{get className(){const p=l.className,A="className"in l&&/^go[0-9]+/.test(p);let L=w.apply({target:t.target,o:A,p:l,g:t.g},n);return[p,L].filter(Boolean).join(" ")}}),[c,a]=Y(o,["as"]),u=c.as||e;let d;if(typeof u=="function")d=u(a);else if(st){const[p,A]=Y(a,["children"]);d=it([`<${u} `,">",`</${u}>`],void 0,p.children||"")}else d=document.createElement(u),Je(d,a);return d};return i.className=r=>W(()=>w.apply({target:t.target,p:r,g:t.g},n)),i}}const x=new Proxy(lt,{get(e,t){return e(t)}});function pe(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const U={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"};function ot(e){return e.reduce((t,[n,i])=>D(I({},t),{[n]:i}),{})}const S=(e,t)=>{var l,o;const n=(o=(l=t==null?void 0:t.space)!=null?l:t==null?void 0:t.spacing)!=null?o:U,r=ot(Object.entries(n).map(([c,a])=>[c,typeof a=="number"?`${a}px`:a]))[e];return pe(r)?r:void 0};function ct(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const at=x("div")`
|
|
2
|
+
@property --maxWidth {
|
|
3
|
+
syntax: "<length-percentage>";
|
|
4
|
+
inherits: false;
|
|
5
|
+
initial-value: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
--maxWidth: ${e=>ct(e.maxWidth)};
|
|
9
|
+
|
|
10
|
+
box-sizing: content-box;
|
|
11
|
+
|
|
12
|
+
margin-inline-start: auto;
|
|
13
|
+
margin-inline-end: auto;
|
|
14
|
+
margin-inline: auto;
|
|
15
|
+
|
|
16
|
+
max-inline-size: var(--maxWidth, 100%);
|
|
17
|
+
|
|
18
|
+
${e=>e.centerChildren?w`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
`:""}
|
|
23
|
+
|
|
24
|
+
${e=>e.centerText?w`
|
|
25
|
+
text-align: center;
|
|
26
|
+
`:""}
|
|
27
|
+
`;function ut(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const ft=x("div")`
|
|
28
|
+
@property --basis {
|
|
29
|
+
syntax: "<length-percentage>";
|
|
30
|
+
inherits: true;
|
|
31
|
+
initial-value: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@property --gutter {
|
|
35
|
+
syntax: "<length-percentage>";
|
|
36
|
+
inherits: false;
|
|
37
|
+
initial-value: 0px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
--basis: ${e=>ut(e.basis)};
|
|
41
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
42
|
+
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
> * {
|
|
45
|
+
margin: 0;
|
|
46
|
+
flex-basis: var(--basis, 100%);
|
|
47
|
+
flex-grow: ${e=>e.noStretchedColumns?"0":"1"};
|
|
48
|
+
flex-shrink: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-wrap: wrap;
|
|
53
|
+
gap: var(--gutter, 0px);
|
|
54
|
+
`;function gt(e){return Array.isArray(e)&&e.length===2&&e.every(Number.isFinite)||typeof e=="string"&&/^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e)}function dt(e){return Array.isArray(e)?e.join("/"):e}function ht(e){return gt(e)?dt(e):void 0}const pt=x.div`
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
display: block;
|
|
57
|
+
inline-size: 100%;
|
|
58
|
+
position: relative;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
|
|
61
|
+
${e=>{const t=ht(e.ratio);return t?w`
|
|
62
|
+
aspect-ratio: ${t};
|
|
63
|
+
`:""}};
|
|
64
|
+
|
|
65
|
+
> * {
|
|
66
|
+
position: absolute;
|
|
67
|
+
|
|
68
|
+
inset-block-start: 0;
|
|
69
|
+
inset-block-end: 0;
|
|
70
|
+
inset-inline-start: 0;
|
|
71
|
+
inset-inline-end: 0;
|
|
72
|
+
|
|
73
|
+
inset-block: 0;
|
|
74
|
+
inset-inline: 0;
|
|
75
|
+
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
> :is(img, video) {
|
|
82
|
+
inline-size: 100%;
|
|
83
|
+
block-size: 100%;
|
|
84
|
+
size: 100%;
|
|
85
|
+
|
|
86
|
+
object-fit: cover;
|
|
87
|
+
object-position: ${e=>typeof e.position=="string"?e.position:"50%"};
|
|
88
|
+
}
|
|
89
|
+
`,yt=x("div")`
|
|
90
|
+
@property --gutter {
|
|
91
|
+
syntax: "<length-percentage>";
|
|
92
|
+
inherits: false;
|
|
93
|
+
initial-value: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@property --minItemWidth {
|
|
97
|
+
syntax: "<length-percentage>";
|
|
98
|
+
inherits: false;
|
|
99
|
+
initial-value: 639px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
103
|
+
--minItemWidth: ${e=>{var t;return typeof e.minItemWidth=="string"?e.minItemWidth:`${(t=e.minItemWidth)!=null?t:0}px`}};
|
|
104
|
+
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
> * {
|
|
107
|
+
margin: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
display: grid;
|
|
111
|
+
gap: var(--gutter, 0px);
|
|
112
|
+
|
|
113
|
+
grid-template-columns: repeat(
|
|
114
|
+
auto-fit,
|
|
115
|
+
minmax(min(var(--minItemWidth, 639px), 100%), 1fr)
|
|
116
|
+
);
|
|
117
|
+
`,P={start:"flex-start",end:"flex-end",center:"center"},B=D(I({},P),{stretch:"stretch"}),mt=x.div`
|
|
118
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
119
|
+
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
> * {
|
|
122
|
+
margin: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
gap: var(--gutter, 0px);
|
|
128
|
+
|
|
129
|
+
justify-content: ${e=>typeof e.justify!="undefined"&&P[e.justify]?P[e.justify]:P.start};
|
|
130
|
+
|
|
131
|
+
align-items: ${e=>typeof e.align!="undefined"&&B[e.align]?B[e.align]:B.start};
|
|
132
|
+
`,se=new Set(["left","right","top","bottom","inlineStart","inlineEnd","blockStart","blockEnd"]),xt=(e,t)=>({left:`padding-inline-start:${t};`,right:`padding-inline-end:${t};`,top:`padding-block-start:${t};`,bottom:`padding-block-end:${t};`,inlineStart:`padding-inline-start:${t};`,inlineEnd:`padding-inline-end:${t};`,blockStart:`padding-block-start:${t};`,blockEnd:`padding-block-end:${t};`})[e];function bt(e){return t=>{const n=S(t,e);return n!=null?n:"0px"}}function wt(e,t){var s;if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=new Set(Object.keys((s=e==null?void 0:e.spacing)!=null?s:U));(()=>typeof t=="string"?!0:Array.isArray(t)?t.every(l=>n.has(l)):t&&Object.keys(t).every(l=>se.has(l))&&Object.values(t).every(l=>n.has(l)))()||console.error("Invalid padding Type");const r=bt(e);return typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((l,[o,c])=>se.has(o)?l+xt(o,r(c)):l,""):t?`padding: ${Array.from(Array.isArray(t)?t:[t]).map(l=>r(l)).join(" ")}`:""}const St=x.div`
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
${e=>wt(e.theme,e.padding)}
|
|
135
|
+
`,$t=x.div`
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
> * {
|
|
138
|
+
margin: 0;
|
|
139
|
+
scroll-snap-align: start;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
143
|
+
|
|
144
|
+
display: flex;
|
|
145
|
+
gap: var(--gutter, 0px);
|
|
146
|
+
|
|
147
|
+
overflow-x: scroll;
|
|
148
|
+
|
|
149
|
+
scroll-snap-type: ${({snapType:e="none"})=>{switch(e){case"none":return"none";case"proximity":return"x proximity";case"mandatory":return"x mandatory";default:return"none"}}};
|
|
150
|
+
`,At=x("div")`
|
|
151
|
+
@property --gutter {
|
|
152
|
+
syntax: "<length-percentage>";
|
|
153
|
+
inherits: false;
|
|
154
|
+
initial-value: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
> * {
|
|
160
|
+
margin: 0;
|
|
161
|
+
}
|
|
2
162
|
display: flex;
|
|
3
163
|
flex-direction: column;
|
|
4
|
-
|
|
5
|
-
|
|
164
|
+
|
|
165
|
+
gap: var(--gutter, 0px);
|
|
166
|
+
align-content: start;
|
|
167
|
+
|
|
168
|
+
& > [data-bedrock-column] {
|
|
169
|
+
grid-column: span 1 / auto;
|
|
170
|
+
}
|
|
171
|
+
`;exports.Center=at;exports.ColumnDrop=ft;exports.Frame=pt;exports.Grid=yt;exports.InlineCluster=mt;exports.PadBox=St;exports.Reel=$t;exports.Stack=At;exports.checkIsCSSLength=pe;exports.getSpacingValue=S;exports.spacing=U;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DefaultTheme } from "solid-styled-components";
|
|
1
2
|
declare type LowercaseCharacter = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
|
|
2
3
|
declare type AllCharacter = LowercaseCharacter | Uppercase<LowercaseCharacter>;
|
|
3
4
|
declare type NonEmptyString = `${AllCharacter}${string}`;
|
|
@@ -18,8 +19,100 @@ export interface Spacing {
|
|
|
18
19
|
xlXXl: CSSLength;
|
|
19
20
|
xxl: CSSLength;
|
|
20
21
|
}
|
|
21
|
-
declare type SpacingOptions = keyof Spacing;
|
|
22
22
|
export declare const spacing: Spacing;
|
|
23
|
+
export declare type BaseTheme = Record<string, CSSLength | string | number>;
|
|
24
|
+
declare type ThemeOrDefaultSpace<T> = T extends {
|
|
25
|
+
space: BaseTheme;
|
|
26
|
+
} ? T["space"] : keyof Spacing;
|
|
27
|
+
declare type SpacingOptions = ThemeOrDefaultSpace<DefaultTheme>;
|
|
28
|
+
declare type MaybeValue = CSSLength | undefined;
|
|
29
|
+
declare type GetSpacingValue = (spacingKey: SpacingOptions, theme?: Partial<BaseTheme>) => MaybeValue;
|
|
30
|
+
export declare const getSpacingValue: GetSpacingValue;
|
|
31
|
+
declare type MaxWidth = number | CSSLength;
|
|
32
|
+
export interface CenterProps {
|
|
33
|
+
maxWidth?: MaxWidth;
|
|
34
|
+
centerText?: boolean;
|
|
35
|
+
centerChildren?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare const Center: ((props: CenterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
38
|
+
className: (props: CenterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
39
|
+
};
|
|
40
|
+
declare type Basis = CSSLength | number;
|
|
41
|
+
export interface ColumnDropProps {
|
|
42
|
+
gutter?: SpacingOptions;
|
|
43
|
+
basis?: Basis;
|
|
44
|
+
noStretchedColumns?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export declare const ColumnDrop: ((props: ColumnDropProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
47
|
+
className: (props: ColumnDropProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
48
|
+
};
|
|
49
|
+
declare type RatioString = `${number}/${number}` | `${number} / ${number}`;
|
|
50
|
+
declare type Ratio = [number, number] | RatioString;
|
|
51
|
+
export interface FrameProps {
|
|
52
|
+
ratio?: Ratio;
|
|
53
|
+
position?: string;
|
|
54
|
+
}
|
|
55
|
+
export declare const Frame: ((props: FrameProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
56
|
+
className: (props: FrameProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
57
|
+
};
|
|
58
|
+
declare type MinItemWidth = number | CSSLength;
|
|
59
|
+
export interface GridProps {
|
|
60
|
+
gutter?: SpacingOptions;
|
|
61
|
+
minItemWidth?: MinItemWidth;
|
|
62
|
+
}
|
|
63
|
+
export declare const Grid: ((props: GridProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
64
|
+
className: (props: GridProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
65
|
+
};
|
|
66
|
+
declare const justifyMap: {
|
|
67
|
+
readonly start: "flex-start";
|
|
68
|
+
readonly end: "flex-end";
|
|
69
|
+
readonly center: "center";
|
|
70
|
+
};
|
|
71
|
+
declare const alignMap: {
|
|
72
|
+
readonly stretch: "stretch";
|
|
73
|
+
readonly start: "flex-start";
|
|
74
|
+
readonly end: "flex-end";
|
|
75
|
+
readonly center: "center";
|
|
76
|
+
};
|
|
77
|
+
export interface InlineClusterProps {
|
|
78
|
+
justify?: keyof typeof justifyMap;
|
|
79
|
+
align?: keyof typeof alignMap;
|
|
80
|
+
gutter: SpacingOptions;
|
|
81
|
+
}
|
|
82
|
+
export declare const InlineCluster: ((props: InlineClusterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
83
|
+
className: (props: InlineClusterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
84
|
+
};
|
|
85
|
+
declare type PaddingObj = {
|
|
86
|
+
left: SpacingOptions;
|
|
87
|
+
} | {
|
|
88
|
+
right: SpacingOptions;
|
|
89
|
+
} | {
|
|
90
|
+
top: SpacingOptions;
|
|
91
|
+
} | {
|
|
92
|
+
bottom: SpacingOptions;
|
|
93
|
+
} | {
|
|
94
|
+
inlineStart: SpacingOptions;
|
|
95
|
+
} | {
|
|
96
|
+
inlineEnd: SpacingOptions;
|
|
97
|
+
} | {
|
|
98
|
+
blockStart: SpacingOptions;
|
|
99
|
+
} | {
|
|
100
|
+
blockEnd: SpacingOptions;
|
|
101
|
+
};
|
|
102
|
+
declare type PaddingTypes = SpacingOptions | PaddingObj | [SpacingOptions] | [SpacingOptions, SpacingOptions] | [SpacingOptions, SpacingOptions, SpacingOptions] | [SpacingOptions, SpacingOptions, SpacingOptions, SpacingOptions];
|
|
103
|
+
export interface PadBoxProps {
|
|
104
|
+
padding: PaddingTypes;
|
|
105
|
+
}
|
|
106
|
+
export declare const PadBox: ((props: PadBoxProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
107
|
+
className: (props: PadBoxProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
108
|
+
};
|
|
109
|
+
export interface ReelProps {
|
|
110
|
+
snapType?: "none" | "proximity" | "mandatory";
|
|
111
|
+
gutter: SpacingOptions;
|
|
112
|
+
}
|
|
113
|
+
export declare const Reel: ((props: ReelProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
114
|
+
className: (props: ReelProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
115
|
+
};
|
|
23
116
|
export interface StackProps {
|
|
24
117
|
gutter?: SpacingOptions;
|
|
25
118
|
}
|
package/lib/index.m.js
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a2, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a2, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a2, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a2;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a2, b) => __defProps(a2, __getOwnPropDescs(b));
|
|
1
20
|
let e = { data: "" }, t = (t2) => typeof window == "object" ? ((t2 ? t2.querySelector("#_goober") : window._goober) || Object.assign((t2 || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : t2 || e, l = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, a = /\/\*[^]*?\*\/|\s\s+|\n/g, n = (e2, t2) => {
|
|
2
21
|
let r = "", l2 = "", a2 = "";
|
|
3
22
|
for (let o2 in e2) {
|
|
@@ -855,7 +874,7 @@ function ssrSpread(accessor) {
|
|
|
855
874
|
}
|
|
856
875
|
const isServer = false;
|
|
857
876
|
const ThemeContext = createContext();
|
|
858
|
-
function
|
|
877
|
+
function makeStyled(tag) {
|
|
859
878
|
let _ctx = this || {};
|
|
860
879
|
return (...args) => {
|
|
861
880
|
const Styled = (props) => {
|
|
@@ -890,6 +909,11 @@ function styled(tag) {
|
|
|
890
909
|
return Styled;
|
|
891
910
|
};
|
|
892
911
|
}
|
|
912
|
+
const styled = new Proxy(makeStyled, {
|
|
913
|
+
get(target, tag) {
|
|
914
|
+
return target(tag);
|
|
915
|
+
}
|
|
916
|
+
});
|
|
893
917
|
function checkIsCSSLength(str) {
|
|
894
918
|
if (typeof str !== "string")
|
|
895
919
|
return false;
|
|
@@ -911,12 +935,319 @@ const spacing = {
|
|
|
911
935
|
xlXXl: "3rem",
|
|
912
936
|
xxl: "4rem"
|
|
913
937
|
};
|
|
938
|
+
function fromEntries(entries) {
|
|
939
|
+
return entries.reduce((acc, [key, value]) => {
|
|
940
|
+
return __spreadProps(__spreadValues({}, acc), { [key]: value });
|
|
941
|
+
}, {});
|
|
942
|
+
}
|
|
943
|
+
const getSpacingValue = (spacingKey, theme) => {
|
|
944
|
+
var _a, _b;
|
|
945
|
+
const maybeSpaceingOrDefault = (_b = (_a = theme == null ? void 0 : theme.space) != null ? _a : theme == null ? void 0 : theme.spacing) != null ? _b : spacing;
|
|
946
|
+
const safeSpacings = fromEntries(Object.entries(maybeSpaceingOrDefault).map(([spaceKey, value]) => [
|
|
947
|
+
spaceKey,
|
|
948
|
+
typeof value === "number" ? `${value}px` : value
|
|
949
|
+
]));
|
|
950
|
+
const spacingVal = safeSpacings[spacingKey];
|
|
951
|
+
const isCSSLength = checkIsCSSLength(spacingVal);
|
|
952
|
+
return isCSSLength ? spacingVal : void 0;
|
|
953
|
+
};
|
|
954
|
+
function getSafeMaxWidth(maxWidth) {
|
|
955
|
+
if (maxWidth === void 0)
|
|
956
|
+
return "100%";
|
|
957
|
+
if (typeof maxWidth === "number")
|
|
958
|
+
return `${maxWidth}px`;
|
|
959
|
+
return maxWidth;
|
|
960
|
+
}
|
|
961
|
+
const Center = styled("div")`
|
|
962
|
+
@property --maxWidth {
|
|
963
|
+
syntax: "<length-percentage>";
|
|
964
|
+
inherits: false;
|
|
965
|
+
initial-value: 100%;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
--maxWidth: ${(props) => getSafeMaxWidth(props.maxWidth)};
|
|
969
|
+
|
|
970
|
+
box-sizing: content-box;
|
|
971
|
+
|
|
972
|
+
margin-inline-start: auto;
|
|
973
|
+
margin-inline-end: auto;
|
|
974
|
+
margin-inline: auto;
|
|
975
|
+
|
|
976
|
+
max-inline-size: var(--maxWidth, 100%);
|
|
977
|
+
|
|
978
|
+
${(props) => props.centerChildren ? u`
|
|
979
|
+
display: flex;
|
|
980
|
+
flex-direction: column;
|
|
981
|
+
align-items: center;
|
|
982
|
+
` : ""}
|
|
983
|
+
|
|
984
|
+
${(props) => props.centerText ? u`
|
|
985
|
+
text-align: center;
|
|
986
|
+
` : ""}
|
|
987
|
+
`;
|
|
988
|
+
function getSafeBasis(basis) {
|
|
989
|
+
if (basis === void 0)
|
|
990
|
+
return "100%";
|
|
991
|
+
if (typeof basis === "number")
|
|
992
|
+
return `${basis}px`;
|
|
993
|
+
return basis;
|
|
994
|
+
}
|
|
995
|
+
const ColumnDrop = styled("div")`
|
|
996
|
+
@property --basis {
|
|
997
|
+
syntax: "<length-percentage>";
|
|
998
|
+
inherits: true;
|
|
999
|
+
initial-value: 100%;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
@property --gutter {
|
|
1003
|
+
syntax: "<length-percentage>";
|
|
1004
|
+
inherits: false;
|
|
1005
|
+
initial-value: 0px;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
--basis: ${(props) => getSafeBasis(props.basis)};
|
|
1009
|
+
--gutter: ${(props) => {
|
|
1010
|
+
var _a;
|
|
1011
|
+
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
1012
|
+
}};
|
|
1013
|
+
|
|
1014
|
+
box-sizing: border-box;
|
|
1015
|
+
> * {
|
|
1016
|
+
margin: 0;
|
|
1017
|
+
flex-basis: var(--basis, 100%);
|
|
1018
|
+
flex-grow: ${(props) => props.noStretchedColumns ? "0" : "1"};
|
|
1019
|
+
flex-shrink: 1;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
display: flex;
|
|
1023
|
+
flex-wrap: wrap;
|
|
1024
|
+
gap: var(--gutter, 0px);
|
|
1025
|
+
`;
|
|
1026
|
+
function checkIsRatio(ratio) {
|
|
1027
|
+
const isCorrectArray = Array.isArray(ratio) && ratio.length === 2 && ratio.every(Number.isFinite);
|
|
1028
|
+
return isCorrectArray || typeof ratio === "string" && /^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(ratio);
|
|
1029
|
+
}
|
|
1030
|
+
function getRatioString(ratio) {
|
|
1031
|
+
return Array.isArray(ratio) ? ratio.join("/") : ratio;
|
|
1032
|
+
}
|
|
1033
|
+
function getSafeRatio(ratio) {
|
|
1034
|
+
const isRatio = checkIsRatio(ratio);
|
|
1035
|
+
return isRatio ? getRatioString(ratio) : void 0;
|
|
1036
|
+
}
|
|
1037
|
+
const Frame = styled.div`
|
|
1038
|
+
box-sizing: border-box;
|
|
1039
|
+
display: block;
|
|
1040
|
+
inline-size: 100%;
|
|
1041
|
+
position: relative;
|
|
1042
|
+
overflow: hidden;
|
|
1043
|
+
|
|
1044
|
+
${(props) => {
|
|
1045
|
+
const maybeRatio = getSafeRatio(props.ratio);
|
|
1046
|
+
if (maybeRatio) {
|
|
1047
|
+
return u`
|
|
1048
|
+
aspect-ratio: ${maybeRatio};
|
|
1049
|
+
`;
|
|
1050
|
+
}
|
|
1051
|
+
return "";
|
|
1052
|
+
}};
|
|
1053
|
+
|
|
1054
|
+
> * {
|
|
1055
|
+
position: absolute;
|
|
1056
|
+
|
|
1057
|
+
inset-block-start: 0;
|
|
1058
|
+
inset-block-end: 0;
|
|
1059
|
+
inset-inline-start: 0;
|
|
1060
|
+
inset-inline-end: 0;
|
|
1061
|
+
|
|
1062
|
+
inset-block: 0;
|
|
1063
|
+
inset-inline: 0;
|
|
1064
|
+
|
|
1065
|
+
display: flex;
|
|
1066
|
+
justify-content: center;
|
|
1067
|
+
align-items: center;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
> :is(img, video) {
|
|
1071
|
+
inline-size: 100%;
|
|
1072
|
+
block-size: 100%;
|
|
1073
|
+
size: 100%;
|
|
1074
|
+
|
|
1075
|
+
object-fit: cover;
|
|
1076
|
+
object-position: ${(props) => typeof props.position === "string" ? props.position : "50%"};
|
|
1077
|
+
}
|
|
1078
|
+
`;
|
|
1079
|
+
const Grid = styled("div")`
|
|
1080
|
+
@property --gutter {
|
|
1081
|
+
syntax: "<length-percentage>";
|
|
1082
|
+
inherits: false;
|
|
1083
|
+
initial-value: 0;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
@property --minItemWidth {
|
|
1087
|
+
syntax: "<length-percentage>";
|
|
1088
|
+
inherits: false;
|
|
1089
|
+
initial-value: 639px;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
--gutter: ${(props) => {
|
|
1093
|
+
var _a;
|
|
1094
|
+
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
1095
|
+
}};
|
|
1096
|
+
--minItemWidth: ${(props) => {
|
|
1097
|
+
var _a;
|
|
1098
|
+
return typeof props.minItemWidth === "string" ? props.minItemWidth : `${(_a = props.minItemWidth) != null ? _a : 0}px`;
|
|
1099
|
+
}};
|
|
1100
|
+
|
|
1101
|
+
box-sizing: border-box;
|
|
1102
|
+
> * {
|
|
1103
|
+
margin: 0;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
display: grid;
|
|
1107
|
+
gap: var(--gutter, 0px);
|
|
1108
|
+
|
|
1109
|
+
grid-template-columns: repeat(
|
|
1110
|
+
auto-fit,
|
|
1111
|
+
minmax(min(var(--minItemWidth, 639px), 100%), 1fr)
|
|
1112
|
+
);
|
|
1113
|
+
`;
|
|
1114
|
+
const justifyMap = {
|
|
1115
|
+
start: "flex-start",
|
|
1116
|
+
end: "flex-end",
|
|
1117
|
+
center: "center"
|
|
1118
|
+
};
|
|
1119
|
+
const alignMap = __spreadProps(__spreadValues({}, justifyMap), {
|
|
1120
|
+
stretch: "stretch"
|
|
1121
|
+
});
|
|
1122
|
+
const InlineCluster = styled.div`
|
|
1123
|
+
--gutter: ${(props) => {
|
|
1124
|
+
var _a;
|
|
1125
|
+
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
1126
|
+
}};
|
|
1127
|
+
|
|
1128
|
+
box-sizing: border-box;
|
|
1129
|
+
> * {
|
|
1130
|
+
margin: 0;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
display: flex;
|
|
1134
|
+
flex-wrap: wrap;
|
|
1135
|
+
gap: var(--gutter, 0px);
|
|
1136
|
+
|
|
1137
|
+
justify-content: ${(props) => typeof props.justify !== "undefined" && justifyMap[props.justify] ? justifyMap[props.justify] : justifyMap.start};
|
|
1138
|
+
|
|
1139
|
+
align-items: ${(props) => typeof props.align !== "undefined" && alignMap[props.align] ? alignMap[props.align] : alignMap.start};
|
|
1140
|
+
`;
|
|
1141
|
+
const validKeys = /* @__PURE__ */ new Set([
|
|
1142
|
+
"left",
|
|
1143
|
+
"right",
|
|
1144
|
+
"top",
|
|
1145
|
+
"bottom",
|
|
1146
|
+
"inlineStart",
|
|
1147
|
+
"inlineEnd",
|
|
1148
|
+
"blockStart",
|
|
1149
|
+
"blockEnd"
|
|
1150
|
+
]);
|
|
1151
|
+
const keyToProperty = (key, val) => {
|
|
1152
|
+
const modernMap = {
|
|
1153
|
+
left: `padding-inline-start:${val};`,
|
|
1154
|
+
right: `padding-inline-end:${val};`,
|
|
1155
|
+
top: `padding-block-start:${val};`,
|
|
1156
|
+
bottom: `padding-block-end:${val};`,
|
|
1157
|
+
inlineStart: `padding-inline-start:${val};`,
|
|
1158
|
+
inlineEnd: `padding-inline-end:${val};`,
|
|
1159
|
+
blockStart: `padding-block-start:${val};`,
|
|
1160
|
+
blockEnd: `padding-block-end:${val};`
|
|
1161
|
+
};
|
|
1162
|
+
return modernMap[key];
|
|
1163
|
+
};
|
|
1164
|
+
function paddingOrDefault(theme) {
|
|
1165
|
+
return (key) => {
|
|
1166
|
+
const maybePadding = getSpacingValue(key, theme);
|
|
1167
|
+
return maybePadding != null ? maybePadding : "0px";
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
function paddingToString(theme, padding) {
|
|
1171
|
+
var _a;
|
|
1172
|
+
if (Array.isArray(padding) && padding.length > 4) {
|
|
1173
|
+
throw new Error("padding arrays can only be 4 or less in length");
|
|
1174
|
+
}
|
|
1175
|
+
const validSpacings = new Set(Object.keys((_a = theme == null ? void 0 : theme.spacing) != null ? _a : spacing));
|
|
1176
|
+
const isValidPadding = () => {
|
|
1177
|
+
if (typeof padding === "string")
|
|
1178
|
+
return true;
|
|
1179
|
+
if (Array.isArray(padding)) {
|
|
1180
|
+
return padding.every((val) => validSpacings.has(val));
|
|
1181
|
+
}
|
|
1182
|
+
return padding && Object.keys(padding).every((key) => validKeys.has(key)) && Object.values(padding).every((val) => validSpacings.has(val));
|
|
1183
|
+
};
|
|
1184
|
+
if (!isValidPadding()) {
|
|
1185
|
+
console.error("Invalid padding Type");
|
|
1186
|
+
}
|
|
1187
|
+
const getPadding = paddingOrDefault(theme);
|
|
1188
|
+
return typeof padding === "object" && !Array.isArray(padding) ? Object.entries(padding).reduce((acc, [key, val]) => validKeys.has(key) ? acc + keyToProperty(key, getPadding(val)) : acc, "") : padding ? `padding: ${Array.from(Array.isArray(padding) ? padding : [padding]).map((pad) => getPadding(pad)).join(" ")}` : "";
|
|
1189
|
+
}
|
|
1190
|
+
const PadBox = styled.div`
|
|
1191
|
+
box-sizing: border-box;
|
|
1192
|
+
${(props) => paddingToString(props.theme, props.padding)}
|
|
1193
|
+
`;
|
|
1194
|
+
const Reel = styled.div`
|
|
1195
|
+
box-sizing: border-box;
|
|
1196
|
+
> * {
|
|
1197
|
+
margin: 0;
|
|
1198
|
+
scroll-snap-align: start;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
--gutter: ${(props) => {
|
|
1202
|
+
var _a;
|
|
1203
|
+
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
1204
|
+
}};
|
|
1205
|
+
|
|
1206
|
+
display: flex;
|
|
1207
|
+
gap: var(--gutter, 0px);
|
|
1208
|
+
|
|
1209
|
+
overflow-x: scroll;
|
|
1210
|
+
|
|
1211
|
+
scroll-snap-type: ${({ snapType = "none" }) => {
|
|
1212
|
+
switch (snapType) {
|
|
1213
|
+
case "none": {
|
|
1214
|
+
return "none";
|
|
1215
|
+
}
|
|
1216
|
+
case "proximity": {
|
|
1217
|
+
return "x proximity";
|
|
1218
|
+
}
|
|
1219
|
+
case "mandatory": {
|
|
1220
|
+
return "x mandatory";
|
|
1221
|
+
}
|
|
1222
|
+
default: {
|
|
1223
|
+
return "none";
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
}};
|
|
1227
|
+
`;
|
|
914
1228
|
const Stack = styled("div")`
|
|
1229
|
+
@property --gutter {
|
|
1230
|
+
syntax: "<length-percentage>";
|
|
1231
|
+
inherits: false;
|
|
1232
|
+
initial-value: 0;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
--gutter: ${(props) => {
|
|
1236
|
+
var _a;
|
|
1237
|
+
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
1238
|
+
}};
|
|
1239
|
+
box-sizing: border-box;
|
|
1240
|
+
> * {
|
|
1241
|
+
margin: 0;
|
|
1242
|
+
}
|
|
915
1243
|
display: flex;
|
|
916
1244
|
flex-direction: column;
|
|
917
|
-
|
|
918
|
-
var
|
|
919
|
-
|
|
920
|
-
|
|
1245
|
+
|
|
1246
|
+
gap: var(--gutter, 0px);
|
|
1247
|
+
align-content: start;
|
|
1248
|
+
|
|
1249
|
+
& > [data-bedrock-column] {
|
|
1250
|
+
grid-column: span 1 / auto;
|
|
1251
|
+
}
|
|
921
1252
|
`;
|
|
922
|
-
export { Stack, checkIsCSSLength, spacing };
|
|
1253
|
+
export { Center, ColumnDrop, Frame, Grid, InlineCluster, PadBox, Reel, Stack, checkIsCSSLength, getSpacingValue, spacing };
|
package/lib/index.umd.js
CHANGED
|
@@ -1,5 +1,171 @@
|
|
|
1
|
-
(function(p,S){typeof exports=="object"&&typeof module!="undefined"?S(exports):typeof define=="function"&&define.amd?define(["exports"],S):(p=typeof globalThis!="undefined"?globalThis:p||self,S(p.solid={}))})(this,function(p){"use strict";let S={data:""},fe=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||S,ue=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ce=/\/\*[^]*?\*\/|\s\s+|\n/g,b=(e,t)=>{let n="",s="",l="";for(let i in e){let r=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+r+";":s+=i[1]=="f"?b(r,i):i+"{"+b(r,i[1]=="k"?"":t)+"}":typeof r=="object"?s+=b(r,t?t.replace(/([^,])+/g,o=>i.replace(/(^:.*)|([^,])+/g,f=>/&/.test(f)?f.replace(/&/g,o):o?o+" "+f:f)):i):r!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=b.p?b.p(i,r):i+":"+r+";")}return n+(t&&l?t+"{"+l+"}":l)+s},A={},X=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+X(e[n]);return t}return e},ae=(e,t,n,s,l)=>{let i=X(e),r=A[i]||(A[i]=(o=>{let f=0,u=11;for(;f<o.length;)u=101*u+o.charCodeAt(f++)>>>0;return"go"+u})(i));if(!A[r]){let o=i!==e?e:(f=>{let u,c=[{}];for(;u=ue.exec(f.replace(ce,""));)u[4]?c.shift():u[3]?c.unshift(c[0][u[3]]=c[0][u[3]]||{}):c[0][u[1]]=u[2];return c[0]})(e);A[r]=b(l?{["@keyframes "+r]:o}:o,n?"":"."+r)}return((o,f,u)=>{f.data.indexOf(o)==-1&&(f.data=u?o+f.data:f.data+o)})(A[r],t,s),r},he=(e,t,n)=>e.reduce((s,l,i)=>{let r=t[i];if(r&&r.call){let o=r(n),f=o&&o.props&&o.props.className||/^go/.test(o)&&o;r=f?"."+f:o&&typeof o=="object"?o.props?"":b(o,""):o===!1?"":o}return s+l+(r==null?"":r)},"");function L(e){let t=this||{},n=e.call?e(t.p):e;return ae(n.unshift?n.raw?he(n,[].slice.call(arguments,1),t.p):n.reduce((s,l)=>Object.assign(s,l&&l.call?l(t.p):l),{}):n,fe(t.target),t.g,t.o,t.k)}L.bind({g:1}),L.bind({k:1});const de=(e,t)=>e===t,ge=Symbol("solid-proxy"),K={equals:de};let pe=Q;const O={},y=1,j=2,ye={owned:null,cleanups:null,context:null,owner:null};var g=null;let C=null,a=null,N=null,h=null,m=null,v=0;function me(e,t,n){const s=M(e,t,!0,y);T(s)}function E(e,t,n){const s=M(e,t,!1,y);T(s)}function V(e,t,n){n=n?Object.assign({},K,n):K;const s=M(e,t,!0,0);return s.pending=O,s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,T(s),Ae.bind(s)}function we(e){if(N)return e();let t;const n=N=[];try{t=e()}finally{N=null}return G(()=>{for(let s=0;s<n.length;s+=1){const l=n[s];if(l.pending!==O){const i=l.pending;l.pending=O,H(l,i)}}},!1),t}function D(e){let t,n=a;return a=null,t=e(),a=n,t}function be(e){const t=Symbol("context");return{id:t,Provider:Ee(t),defaultValue:e}}function xe(e){return J(g,e.id)||e.defaultValue}function Se(e){const t=V(e);return V(()=>_(t()))}function Ae(){const e=C;if(this.sources&&(this.state||e)){const t=h;h=null,this.state===y||e?T(this):B(this),h=t}if(a){const t=this.observers?this.observers.length:0;a.sources?(a.sources.push(this),a.sourceSlots.push(t)):(a.sources=[this],a.sourceSlots=[t]),this.observers?(this.observers.push(a),this.observerSlots.push(a.sources.length-1)):(this.observers=[a],this.observerSlots=[a.sources.length-1])}return this.value}function H(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(N)return e.pending===O&&N.push(e),e.pending=t,t;let s=!1;return e.value=t,e.observers&&e.observers.length&&G(()=>{for(let l=0;l<e.observers.length;l+=1){const i=e.observers[l];s&&C.disposed.has(i),i.pure?h.push(i):m.push(i),i.observers&&(s&&!i.tState||!s&&!i.state)&&W(i),s||(i.state=y)}if(h.length>1e6)throw h=[],new Error},!1),t}function T(e){if(!e.fn)return;Y(e);const t=g,n=a,s=v;a=g=e,Ce(e,e.value,s),a=n,g=t}function Ce(e,t,n){let s;try{s=e.fn(t)}catch(l){Z(l)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?H(e,s):e.value=s,e.updatedAt=n)}function M(e,t,n,s=y,l){const i={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:g,context:null,pure:n};return g===null||g!==ye&&(g.owned?g.owned.push(i):g.owned=[i]),i}function R(e){const t=C;if(e.state!==y)return e.state=0;if(e.suspense&&D(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<v);)(e.state||t)&&n.push(e);for(let s=n.length-1;s>=0;s--)if(e=n[s],e.state===y||t)T(e);else if(e.state===j||t){const l=h;h=null,B(e,n[0]),h=l}}function G(e,t){if(h)return e();let n=!1;t||(h=[]),m?n=!0:m=[],v++;try{return e()}catch(s){Z(s)}finally{Ne(n)}}function Ne(e){h&&(Q(h),h=null),!e&&(m.length?we(()=>{pe(m),m=null}):m=null)}function Q(e){for(let t=0;t<e.length;t++)R(e[t])}function B(e,t){e.state=0;const n=C;for(let s=0;s<e.sources.length;s+=1){const l=e.sources[s];l.sources&&(l.state===y||n?l!==t&&R(l):(l.state===j||n)&&B(l,t))}}function W(e){const t=C;for(let n=0;n<e.observers.length;n+=1){const s=e.observers[n];(!s.state||t)&&(s.state=j,s.pure?h.push(s):m.push(s),s.observers&&W(s))}}function Y(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const i=l.pop(),r=n.observerSlots.pop();s<l.length&&(i.sourceSlots[r]=s,l[s]=i,n.observerSlots[s]=r)}}if(e.owned){for(t=0;t<e.owned.length;t++)Y(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function Z(e){throw e}function J(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&J(e.owner,t))}function _(e){if(typeof e=="function"&&!e.length)return _(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=_(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Ee(e){return function(n){let s;return me(()=>s=D(()=>(g.context={[e]:n.value},Se(()=>n.children)))),s}}function $(){return!0}const z={get(e,t,n){return t===ge?n:e.get(t)},has(e,t){return e.has(t)},set:$,deleteProperty:$,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:$,deleteProperty:$}},ownKeys(e){return e.keys()}};function F(e){return typeof e=="function"?e():e}function ee(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const s=F(e[n])[t];if(s!==void 0)return s}},has(t){for(let n=e.length-1;n>=0;n--)if(t in F(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(F(e[n])));return[...new Set(t)]}},z)}function te(e,...t){const n=new Set(t.flat()),s=Object.getOwnPropertyDescriptors(e),l=t.map(i=>{const r={};for(let o=0;o<i.length;o++){const f=i[o];Object.defineProperty(r,f,s[f]?s[f]:{get(){return e[f]},set(){return!0}})}return r});return l.push(new Proxy({get(i){return n.has(i)?void 0:e[i]},has(i){return n.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!n.has(i))}},z)),l}const Te=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Pe=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Te]),Le=new Set(["innerHTML","textContent","innerText","children"]),Oe={className:"class",htmlFor:"for"},ne={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},$e=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),ke={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function je(e,t,n){let s=n.length,l=t.length,i=s,r=0,o=0,f=t[l-1].nextSibling,u=null;for(;r<l||o<i;){if(t[r]===n[o]){r++,o++;continue}for(;t[l-1]===n[i-1];)l--,i--;if(l===r){const c=i<s?o?n[o-1].nextSibling:n[i-o]:f;for(;o<i;)e.insertBefore(n[o++],c)}else if(i===o)for(;r<l;)(!u||!u.has(t[r]))&&t[r].remove(),r++;else if(t[r]===n[i-1]&&n[o]===t[l-1]){const c=t[--l].nextSibling;e.insertBefore(n[o++],t[r++].nextSibling),e.insertBefore(n[--i],c),t[l]=n[i]}else{if(!u){u=new Map;let d=o;for(;d<i;)u.set(n[d],d++)}const c=u.get(t[r]);if(c!=null)if(o<c&&c<i){let d=r,w=1,P;for(;++d<l&&d<i&&!((P=u.get(t[d]))==null||P!==c+w);)w++;if(w>c-o){const U=t[r];for(;o<c;)e.insertBefore(n[o++],U)}else e.replaceChild(n[o++],t[r++])}else r++;else t[r++].remove()}}}const se="_$DX_DELEGATE";function ve(e,t=window.document){const n=t[se]||(t[se]=new Set);for(let s=0,l=e.length;s<l;s++){const i=e[s];n.has(i)||(n.add(i),t.addEventListener(i,Xe))}}function De(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Me(e,t,n,s){s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s)}function Be(e,t,n,s){s?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,l=>n[0](n[1],l)):e.addEventListener(t,n)}function _e(e,t,n={}){const s=Object.keys(t||{}),l=Object.keys(n);let i,r;for(i=0,r=l.length;i<r;i++){const o=l[i];!o||o==="undefined"||t[o]||(ie(e,o,!1),delete n[o])}for(i=0,r=s.length;i<r;i++){const o=s[i],f=!!t[o];!o||o==="undefined"||n[o]===f||!f||(ie(e,o,!0),n[o]=f)}return n}function Fe(e,t,n={}){const s=e.style;if(t==null||typeof t=="string")return s.cssText=t;typeof n=="string"&&(n={});let l,i;for(i in n)t[i]==null&&s.removeProperty(i),delete n[i];for(i in t)l=t[i],l!==n[i]&&(s.setProperty(i,l),n[i]=l);return n}function Ie(e,t,n,s){typeof t=="function"?E(l=>oe(e,t(),l,n,s)):oe(e,t,void 0,n,s)}function qe(e,t,n,s,l={}){for(const i in l)if(!(i in t)){if(i==="children")continue;le(e,i,null,l[i],n)}for(const i in t){if(i==="children"){s||k(e,t.children);continue}const r=t[i];l[i]=le(e,i,r,l[i],n)}}function Ue(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function ie(e,t,n){const s=t.trim().split(/\s+/);for(let l=0,i=s.length;l<i;l++)e.classList.toggle(s[l],n)}function le(e,t,n,s,l){let i,r,o;if(t==="style")return Fe(e,n,s);if(t==="classList")return _e(e,n,s);if(n===s)return s;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),u=$e.has(f);Be(e,f,n,u),u&&ve([f])}else if((o=Le.has(t))||!l&&(ne[t]||(r=Pe.has(t)))||(i=e.nodeName.includes("-")))i&&!r&&!o?e[Ue(t)]=n:e[ne[t]||t]=n;else{const f=l&&t.indexOf(":")>-1&&ke[t.split(":")[0]];f?Me(e,f,t,n):De(e,Oe[t]||t,n)}return n}function Xe(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const s=n[t];if(s&&!n.disabled){const l=n[`${t}Data`];if(l!==void 0?s(l,e):s(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function oe(e,t,n={},s,l){return!l&&"children"in t&&E(()=>n.children=k(e,t.children,n.children)),E(()=>qe(e,t,s,!0,n)),n}function k(e,t,n,s,l){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,r=s!==void 0;if(e=r&&n[0]&&n[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(t=t.toString()),r){let o=n[0];o&&o.nodeType===3?o.data=t:o=document.createTextNode(t),n=x(e,n,s,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||i==="boolean")n=x(e,n,s);else{if(i==="function")return E(()=>{let o=t();for(;typeof o=="function";)o=o();n=k(e,o,n,s)}),()=>n;if(Array.isArray(t)){const o=[];if(I(o,t,l))return E(()=>n=k(e,o,n,s,!0)),()=>n;if(o.length===0){if(n=x(e,n,s),r)return n}else Array.isArray(n)?n.length===0?re(e,o,s):je(e,n,o):(n&&x(e),re(e,o));n=o}else if(t instanceof Node){if(Array.isArray(n)){if(r)return n=x(e,n,s,t);x(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function I(e,t,n){let s=!1;for(let l=0,i=t.length;l<i;l++){let r=t[l],o;if(r instanceof Node)e.push(r);else if(!(r==null||r===!0||r===!1))if(Array.isArray(r))s=I(e,r)||s;else if((o=typeof r)=="string")e.push(document.createTextNode(r));else if(o==="function")if(n){for(;typeof r=="function";)r=r();s=I(e,Array.isArray(r)?r:[r])||s}else e.push(r),s=!0;else e.push(document.createTextNode(r.toString()))}return s}function re(e,t,n){for(let s=0,l=t.length;s<l;s++)e.insertBefore(t[s],n)}function x(e,t,n,s){if(n===void 0)return e.textContent="";const l=s||document.createTextNode("");if(t.length){let i=!1;for(let r=t.length-1;r>=0;r--){const o=t[r];if(l!==o){const f=o.parentNode===e;!i&&!r?f?e.replaceChild(l,o):e.insertBefore(l,n):f&&o.remove()}else i=!0}}else e.insertBefore(l,n);return[l]}function Ke(e,...t){}function We(e){}const Ve=!1,He=be();function Re(e){let t=this||{};return(...n)=>{const s=l=>{const i=xe(He),r=ee(l,{theme:i}),o=ee(r,{get className(){const w=r.className,P="className"in r&&/^go[0-9]+/.test(w);let U=L.apply({target:t.target,o:P,p:r,g:t.g},n);return[w,U].filter(Boolean).join(" ")}}),[f,u]=te(o,["as"]),c=f.as||e;let d;if(typeof c=="function")d=c(u);else if(Ve){const[w,P]=te(u,["children"]);d=Ke([`<${c} `,">",`</${c}>`],void 0,w.children||"")}else d=document.createElement(c),Ie(d,u);return d};return s.className=l=>D(()=>L.apply({target:t.target,p:l,g:t.g},n)),s}}function Ge(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const q={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"},Qe=Re("div")`
|
|
1
|
+
var wt=Object.defineProperty,St=Object.defineProperties;var $t=Object.getOwnPropertyDescriptors;var me=Object.getOwnPropertySymbols;var At=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable;var be=(a,g,p)=>g in a?wt(a,g,{enumerable:!0,configurable:!0,writable:!0,value:p}):a[g]=p,K=(a,g)=>{for(var p in g||(g={}))At.call(g,p)&&be(a,p,g[p]);if(me)for(var p of me(g))Ct.call(g,p)&&be(a,p,g[p]);return a},G=(a,g)=>St(a,$t(g));(function(a,g){typeof exports=="object"&&typeof module!="undefined"?g(exports):typeof define=="function"&&define.amd?define(["exports"],g):(a=typeof globalThis!="undefined"?globalThis:a||self,g(a.solid={}))})(this,function(a){"use strict";let g={data:""},p=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||g,xe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,we=/\/\*[^]*?\*\/|\s\s+|\n/g,$=(e,t)=>{let n="",i="",r="";for(let s in e){let l=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+l+";":i+=s[1]=="f"?$(l,s):s+"{"+$(l,s[1]=="k"?"":t)+"}":typeof l=="object"?i+=$(l,t?t.replace(/([^,])+/g,o=>s.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,o):o?o+" "+c:c)):s):l!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=$.p?$.p(s,l):s+":"+l+";")}return n+(t&&r?t+"{"+r+"}":r)+i},k={},H=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+H(e[n]);return t}return e},Se=(e,t,n,i,r)=>{let s=H(e),l=k[s]||(k[s]=(o=>{let c=0,u=11;for(;c<o.length;)u=101*u+o.charCodeAt(c++)>>>0;return"go"+u})(s));if(!k[l]){let o=s!==e?e:(c=>{let u,f=[{}];for(;u=xe.exec(c.replace(we,""));)u[4]?f.shift():u[3]?f.unshift(f[0][u[3]]=f[0][u[3]]||{}):f[0][u[1]]=u[2];return f[0]})(e);k[l]=$(r?{["@keyframes "+l]:o}:o,n?"":"."+l)}return((o,c,u)=>{c.data.indexOf(o)==-1&&(c.data=u?o+c.data:c.data+o)})(k[l],t,i),l},$e=(e,t,n)=>e.reduce((i,r,s)=>{let l=t[s];if(l&&l.call){let o=l(n),c=o&&o.props&&o.props.className||/^go/.test(o)&&o;l=c?"."+c:o&&typeof o=="object"?o.props?"":$(o,""):o===!1?"":o}return i+r+(l==null?"":l)},"");function A(e){let t=this||{},n=e.call?e(t.p):e;return Se(n.unshift?n.raw?$e(n,[].slice.call(arguments,1),t.p):n.reduce((i,r)=>Object.assign(i,r&&r.call?r(t.p):r),{}):n,p(t.target),t.g,t.o,t.k)}A.bind({g:1}),A.bind({k:1});const Ae=(e,t)=>e===t,Ce=Symbol("solid-proxy"),Q={equals:Ae};let ve=te;const O={},b=1,M=2,ke={owned:null,cleanups:null,context:null,owner:null};var m=null;let E=null,d=null,N=null,h=null,x=null,B=0;function Ee(e,t,n){const i=R(e,t,!0,b);T(i)}function j(e,t,n){const i=R(e,t,!1,b);T(i)}function Y(e,t,n){n=n?Object.assign({},Q,n):Q;const i=R(e,t,!0,0);return i.pending=O,i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,T(i),Oe.bind(i)}function Ne(e){if(N)return e();let t;const n=N=[];try{t=e()}finally{N=null}return ee(()=>{for(let i=0;i<n.length;i+=1){const r=n[i];if(r.pending!==O){const s=r.pending;r.pending=O,Z(r,s)}}},!1),t}function F(e){let t,n=d;return d=null,t=e(),d=n,t}function je(e){const t=Symbol("context");return{id:t,Provider:De(t),defaultValue:e}}function Te(e){return re(m,e.id)||e.defaultValue}function Pe(e){const t=Y(e);return Y(()=>V(t()))}function Oe(){const e=E;if(this.sources&&(this.state||e)){const t=h;h=null,this.state===b||e?T(this):z(this),h=t}if(d){const t=this.observers?this.observers.length:0;d.sources?(d.sources.push(this),d.sourceSlots.push(t)):(d.sources=[this],d.sourceSlots=[t]),this.observers?(this.observers.push(d),this.observerSlots.push(d.sources.length-1)):(this.observers=[d],this.observerSlots=[d.sources.length-1])}return this.value}function Z(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(N)return e.pending===O&&N.push(e),e.pending=t,t;let i=!1;return e.value=t,e.observers&&e.observers.length&&ee(()=>{for(let r=0;r<e.observers.length;r+=1){const s=e.observers[r];i&&E.disposed.has(s),s.pure?h.push(s):x.push(s),s.observers&&(i&&!s.tState||!i&&!s.state)&&ne(s),i||(s.state=b)}if(h.length>1e6)throw h=[],new Error},!1),t}function T(e){if(!e.fn)return;ie(e);const t=m,n=d,i=B;d=m=e,Le(e,e.value,i),d=n,m=t}function Le(e,t,n){let i;try{i=e.fn(t)}catch(r){se(r)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?Z(e,i):e.value=i,e.updatedAt=n)}function R(e,t,n,i=b,r){const s={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:null,pure:n};return m===null||m!==ke&&(m.owned?m.owned.push(s):m.owned=[s]),s}function J(e){const t=E;if(e.state!==b)return e.state=0;if(e.suspense&&F(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<B);)(e.state||t)&&n.push(e);for(let i=n.length-1;i>=0;i--)if(e=n[i],e.state===b||t)T(e);else if(e.state===M||t){const r=h;h=null,z(e,n[0]),h=r}}function ee(e,t){if(h)return e();let n=!1;t||(h=[]),x?n=!0:x=[],B++;try{return e()}catch(i){se(i)}finally{Ie(n)}}function Ie(e){h&&(te(h),h=null),!e&&(x.length?Ne(()=>{ve(x),x=null}):x=null)}function te(e){for(let t=0;t<e.length;t++)J(e[t])}function z(e,t){e.state=0;const n=E;for(let i=0;i<e.sources.length;i+=1){const r=e.sources[i];r.sources&&(r.state===b||n?r!==t&&J(r):(r.state===M||n)&&z(r,t))}}function ne(e){const t=E;for(let n=0;n<e.observers.length;n+=1){const i=e.observers[n];(!i.state||t)&&(i.state=M,i.pure?h.push(i):x.push(i),i.observers&&ne(i))}}function ie(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),i=e.sourceSlots.pop(),r=n.observers;if(r&&r.length){const s=r.pop(),l=n.observerSlots.pop();i<r.length&&(s.sourceSlots[l]=i,r[i]=s,n.observerSlots[i]=l)}}if(e.owned){for(t=0;t<e.owned.length;t++)ie(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function se(e){throw e}function re(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&re(e.owner,t))}function V(e){if(typeof e=="function"&&!e.length)return V(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=V(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function De(e){return function(n){let i;return Ee(()=>i=F(()=>(m.context={[e]:n.value},Pe(()=>n.children)))),i}}function L(){return!0}const le={get(e,t,n){return t===Ce?n:e.get(t)},has(e,t){return e.has(t)},set:L,deleteProperty:L,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:L,deleteProperty:L}},ownKeys(e){return e.keys()}};function W(e){return typeof e=="function"?e():e}function oe(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const i=W(e[n])[t];if(i!==void 0)return i}},has(t){for(let n=e.length-1;n>=0;n--)if(t in W(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(W(e[n])));return[...new Set(t)]}},le)}function ce(e,...t){const n=new Set(t.flat()),i=Object.getOwnPropertyDescriptors(e),r=t.map(s=>{const l={};for(let o=0;o<s.length;o++){const c=s[o];Object.defineProperty(l,c,i[c]?i[c]:{get(){return e[c]},set(){return!0}})}return l});return r.push(new Proxy({get(s){return n.has(s)?void 0:e[s]},has(s){return n.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!n.has(s))}},le)),r}const Me=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Be=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Me]),Fe=new Set(["innerHTML","textContent","innerText","children"]),Re={className:"class",htmlFor:"for"},ue={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},ze=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ve={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function We(e,t,n){let i=n.length,r=t.length,s=i,l=0,o=0,c=t[r-1].nextSibling,u=null;for(;l<r||o<s;){if(t[l]===n[o]){l++,o++;continue}for(;t[r-1]===n[s-1];)r--,s--;if(r===l){const f=s<i?o?n[o-1].nextSibling:n[s-o]:c;for(;o<s;)e.insertBefore(n[o++],f)}else if(s===o)for(;l<r;)(!u||!u.has(t[l]))&&t[l].remove(),l++;else if(t[l]===n[s-1]&&n[o]===t[r-1]){const f=t[--r].nextSibling;e.insertBefore(n[o++],t[l++].nextSibling),e.insertBefore(n[--s],f),t[r]=n[s]}else{if(!u){u=new Map;let y=o;for(;y<s;)u.set(n[y],y++)}const f=u.get(t[l]);if(f!=null)if(o<f&&f<s){let y=l,S=1,P;for(;++y<r&&y<s&&!((P=u.get(t[y]))==null||P!==f+S);)S++;if(S>f-o){const X=t[l];for(;o<f;)e.insertBefore(n[o++],X)}else e.replaceChild(n[o++],t[l++])}else l++;else t[l++].remove()}}}const ae="_$DX_DELEGATE";function _e(e,t=window.document){const n=t[ae]||(t[ae]=new Set);for(let i=0,r=e.length;i<r;i++){const s=e[i];n.has(s)||(n.add(s),t.addEventListener(s,Ze))}}function qe(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Ue(e,t,n,i){i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i)}function Xe(e,t,n,i){i?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,r=>n[0](n[1],r)):e.addEventListener(t,n)}function Ke(e,t,n={}){const i=Object.keys(t||{}),r=Object.keys(n);let s,l;for(s=0,l=r.length;s<l;s++){const o=r[s];!o||o==="undefined"||t[o]||(fe(e,o,!1),delete n[o])}for(s=0,l=i.length;s<l;s++){const o=i[s],c=!!t[o];!o||o==="undefined"||n[o]===c||!c||(fe(e,o,!0),n[o]=c)}return n}function Ge(e,t,n={}){const i=e.style;if(t==null||typeof t=="string")return i.cssText=t;typeof n=="string"&&(n={});let r,s;for(s in n)t[s]==null&&i.removeProperty(s),delete n[s];for(s in t)r=t[s],r!==n[s]&&(i.setProperty(s,r),n[s]=r);return n}function He(e,t,n,i){typeof t=="function"?j(r=>de(e,t(),r,n,i)):de(e,t,void 0,n,i)}function Qe(e,t,n,i,r={}){for(const s in r)if(!(s in t)){if(s==="children")continue;ge(e,s,null,r[s],n)}for(const s in t){if(s==="children"){i||I(e,t.children);continue}const l=t[s];r[s]=ge(e,s,l,r[s],n)}}function Ye(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function fe(e,t,n){const i=t.trim().split(/\s+/);for(let r=0,s=i.length;r<s;r++)e.classList.toggle(i[r],n)}function ge(e,t,n,i,r){let s,l,o;if(t==="style")return Ge(e,n,i);if(t==="classList")return Ke(e,n,i);if(n===i)return i;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const c=t.slice(2).toLowerCase(),u=ze.has(c);Xe(e,c,n,u),u&&_e([c])}else if((o=Fe.has(t))||!r&&(ue[t]||(l=Be.has(t)))||(s=e.nodeName.includes("-")))s&&!l&&!o?e[Ye(t)]=n:e[ue[t]||t]=n;else{const c=r&&t.indexOf(":")>-1&&Ve[t.split(":")[0]];c?Ue(e,c,t,n):qe(e,Re[t]||t,n)}return n}function Ze(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const i=n[t];if(i&&!n.disabled){const r=n[`${t}Data`];if(r!==void 0?i(r,e):i(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function de(e,t,n={},i,r){return!r&&"children"in t&&j(()=>n.children=I(e,t.children,n.children)),j(()=>Qe(e,t,i,!0,n)),n}function I(e,t,n,i,r){for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,l=i!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,s==="string"||s==="number")if(s==="number"&&(t=t.toString()),l){let o=n[0];o&&o.nodeType===3?o.data=t:o=document.createTextNode(t),n=v(e,n,i,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||s==="boolean")n=v(e,n,i);else{if(s==="function")return j(()=>{let o=t();for(;typeof o=="function";)o=o();n=I(e,o,n,i)}),()=>n;if(Array.isArray(t)){const o=[];if(_(o,t,r))return j(()=>n=I(e,o,n,i,!0)),()=>n;if(o.length===0){if(n=v(e,n,i),l)return n}else Array.isArray(n)?n.length===0?he(e,o,i):We(e,n,o):(n&&v(e),he(e,o));n=o}else if(t instanceof Node){if(Array.isArray(n)){if(l)return n=v(e,n,i,t);v(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function _(e,t,n){let i=!1;for(let r=0,s=t.length;r<s;r++){let l=t[r],o;if(l instanceof Node)e.push(l);else if(!(l==null||l===!0||l===!1))if(Array.isArray(l))i=_(e,l)||i;else if((o=typeof l)=="string")e.push(document.createTextNode(l));else if(o==="function")if(n){for(;typeof l=="function";)l=l();i=_(e,Array.isArray(l)?l:[l])||i}else e.push(l),i=!0;else e.push(document.createTextNode(l.toString()))}return i}function he(e,t,n){for(let i=0,r=t.length;i<r;i++)e.insertBefore(t[i],n)}function v(e,t,n,i){if(n===void 0)return e.textContent="";const r=i||document.createTextNode("");if(t.length){let s=!1;for(let l=t.length-1;l>=0;l--){const o=t[l];if(r!==o){const c=o.parentNode===e;!s&&!l?c?e.replaceChild(r,o):e.insertBefore(r,n):c&&o.remove()}else s=!0}}else e.insertBefore(r,n);return[r]}function Je(e,...t){}function vt(e){}const et=!1,tt=je();function nt(e){let t=this||{};return(...n)=>{const i=r=>{const s=Te(tt),l=oe(r,{theme:s}),o=oe(l,{get className(){const S=l.className,P="className"in l&&/^go[0-9]+/.test(S);let X=A.apply({target:t.target,o:P,p:l,g:t.g},n);return[S,X].filter(Boolean).join(" ")}}),[c,u]=ce(o,["as"]),f=c.as||e;let y;if(typeof f=="function")y=f(u);else if(et){const[S,P]=ce(u,["children"]);y=Je([`<${f} `,">",`</${f}>`],void 0,S.children||"")}else y=document.createElement(f),He(y,u);return y};return i.className=r=>F(()=>A.apply({target:t.target,p:r,g:t.g},n)),i}}const w=new Proxy(nt,{get(e,t){return e(t)}});function ye(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const q={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"};function it(e){return e.reduce((t,[n,i])=>G(K({},t),{[n]:i}),{})}const C=(e,t)=>{var l,o;const n=(o=(l=t==null?void 0:t.space)!=null?l:t==null?void 0:t.spacing)!=null?o:q,r=it(Object.entries(n).map(([c,u])=>[c,typeof u=="number"?`${u}px`:u]))[e];return ye(r)?r:void 0};function st(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const rt=w("div")`
|
|
2
|
+
@property --maxWidth {
|
|
3
|
+
syntax: "<length-percentage>";
|
|
4
|
+
inherits: false;
|
|
5
|
+
initial-value: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
--maxWidth: ${e=>st(e.maxWidth)};
|
|
9
|
+
|
|
10
|
+
box-sizing: content-box;
|
|
11
|
+
|
|
12
|
+
margin-inline-start: auto;
|
|
13
|
+
margin-inline-end: auto;
|
|
14
|
+
margin-inline: auto;
|
|
15
|
+
|
|
16
|
+
max-inline-size: var(--maxWidth, 100%);
|
|
17
|
+
|
|
18
|
+
${e=>e.centerChildren?A`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
`:""}
|
|
23
|
+
|
|
24
|
+
${e=>e.centerText?A`
|
|
25
|
+
text-align: center;
|
|
26
|
+
`:""}
|
|
27
|
+
`;function lt(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const ot=w("div")`
|
|
28
|
+
@property --basis {
|
|
29
|
+
syntax: "<length-percentage>";
|
|
30
|
+
inherits: true;
|
|
31
|
+
initial-value: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@property --gutter {
|
|
35
|
+
syntax: "<length-percentage>";
|
|
36
|
+
inherits: false;
|
|
37
|
+
initial-value: 0px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
--basis: ${e=>lt(e.basis)};
|
|
41
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
42
|
+
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
> * {
|
|
45
|
+
margin: 0;
|
|
46
|
+
flex-basis: var(--basis, 100%);
|
|
47
|
+
flex-grow: ${e=>e.noStretchedColumns?"0":"1"};
|
|
48
|
+
flex-shrink: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-wrap: wrap;
|
|
53
|
+
gap: var(--gutter, 0px);
|
|
54
|
+
`;function ct(e){return Array.isArray(e)&&e.length===2&&e.every(Number.isFinite)||typeof e=="string"&&/^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e)}function ut(e){return Array.isArray(e)?e.join("/"):e}function at(e){return ct(e)?ut(e):void 0}const ft=w.div`
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
display: block;
|
|
57
|
+
inline-size: 100%;
|
|
58
|
+
position: relative;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
|
|
61
|
+
${e=>{const t=at(e.ratio);return t?A`
|
|
62
|
+
aspect-ratio: ${t};
|
|
63
|
+
`:""}};
|
|
64
|
+
|
|
65
|
+
> * {
|
|
66
|
+
position: absolute;
|
|
67
|
+
|
|
68
|
+
inset-block-start: 0;
|
|
69
|
+
inset-block-end: 0;
|
|
70
|
+
inset-inline-start: 0;
|
|
71
|
+
inset-inline-end: 0;
|
|
72
|
+
|
|
73
|
+
inset-block: 0;
|
|
74
|
+
inset-inline: 0;
|
|
75
|
+
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
> :is(img, video) {
|
|
82
|
+
inline-size: 100%;
|
|
83
|
+
block-size: 100%;
|
|
84
|
+
size: 100%;
|
|
85
|
+
|
|
86
|
+
object-fit: cover;
|
|
87
|
+
object-position: ${e=>typeof e.position=="string"?e.position:"50%"};
|
|
88
|
+
}
|
|
89
|
+
`,gt=w("div")`
|
|
90
|
+
@property --gutter {
|
|
91
|
+
syntax: "<length-percentage>";
|
|
92
|
+
inherits: false;
|
|
93
|
+
initial-value: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@property --minItemWidth {
|
|
97
|
+
syntax: "<length-percentage>";
|
|
98
|
+
inherits: false;
|
|
99
|
+
initial-value: 639px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
103
|
+
--minItemWidth: ${e=>{var t;return typeof e.minItemWidth=="string"?e.minItemWidth:`${(t=e.minItemWidth)!=null?t:0}px`}};
|
|
104
|
+
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
> * {
|
|
107
|
+
margin: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
display: grid;
|
|
111
|
+
gap: var(--gutter, 0px);
|
|
112
|
+
|
|
113
|
+
grid-template-columns: repeat(
|
|
114
|
+
auto-fit,
|
|
115
|
+
minmax(min(var(--minItemWidth, 639px), 100%), 1fr)
|
|
116
|
+
);
|
|
117
|
+
`,D={start:"flex-start",end:"flex-end",center:"center"},U=G(K({},D),{stretch:"stretch"}),dt=w.div`
|
|
118
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
119
|
+
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
> * {
|
|
122
|
+
margin: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
gap: var(--gutter, 0px);
|
|
128
|
+
|
|
129
|
+
justify-content: ${e=>typeof e.justify!="undefined"&&D[e.justify]?D[e.justify]:D.start};
|
|
130
|
+
|
|
131
|
+
align-items: ${e=>typeof e.align!="undefined"&&U[e.align]?U[e.align]:U.start};
|
|
132
|
+
`,pe=new Set(["left","right","top","bottom","inlineStart","inlineEnd","blockStart","blockEnd"]),ht=(e,t)=>({left:`padding-inline-start:${t};`,right:`padding-inline-end:${t};`,top:`padding-block-start:${t};`,bottom:`padding-block-end:${t};`,inlineStart:`padding-inline-start:${t};`,inlineEnd:`padding-inline-end:${t};`,blockStart:`padding-block-start:${t};`,blockEnd:`padding-block-end:${t};`})[e];function yt(e){return t=>{const n=C(t,e);return n!=null?n:"0px"}}function pt(e,t){var s;if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=new Set(Object.keys((s=e==null?void 0:e.spacing)!=null?s:q));(()=>typeof t=="string"?!0:Array.isArray(t)?t.every(l=>n.has(l)):t&&Object.keys(t).every(l=>pe.has(l))&&Object.values(t).every(l=>n.has(l)))()||console.error("Invalid padding Type");const r=yt(e);return typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((l,[o,c])=>pe.has(o)?l+ht(o,r(c)):l,""):t?`padding: ${Array.from(Array.isArray(t)?t:[t]).map(l=>r(l)).join(" ")}`:""}const mt=w.div`
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
${e=>pt(e.theme,e.padding)}
|
|
135
|
+
`,bt=w.div`
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
> * {
|
|
138
|
+
margin: 0;
|
|
139
|
+
scroll-snap-align: start;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
143
|
+
|
|
144
|
+
display: flex;
|
|
145
|
+
gap: var(--gutter, 0px);
|
|
146
|
+
|
|
147
|
+
overflow-x: scroll;
|
|
148
|
+
|
|
149
|
+
scroll-snap-type: ${({snapType:e="none"})=>{switch(e){case"none":return"none";case"proximity":return"x proximity";case"mandatory":return"x mandatory";default:return"none"}}};
|
|
150
|
+
`,xt=w("div")`
|
|
151
|
+
@property --gutter {
|
|
152
|
+
syntax: "<length-percentage>";
|
|
153
|
+
inherits: false;
|
|
154
|
+
initial-value: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
> * {
|
|
160
|
+
margin: 0;
|
|
161
|
+
}
|
|
2
162
|
display: flex;
|
|
3
163
|
flex-direction: column;
|
|
4
|
-
|
|
5
|
-
|
|
164
|
+
|
|
165
|
+
gap: var(--gutter, 0px);
|
|
166
|
+
align-content: start;
|
|
167
|
+
|
|
168
|
+
& > [data-bedrock-column] {
|
|
169
|
+
grid-column: span 1 / auto;
|
|
170
|
+
}
|
|
171
|
+
`;a.Center=rt,a.ColumnDrop=ot,a.Frame=ft,a.Grid=gt,a.InlineCluster=dt,a.PadBox=mt,a.Reel=bt,a.Stack=xt,a.checkIsCSSLength=ye,a.getSpacingValue=C,a.spacing=q,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bedrock-layout/solid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "solid.js port of bedrock-layout primitives",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"private": false,
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"bugs": {
|
|
60
60
|
"url": "https://github.com/Bedrock-Layouts/Solid-Bedrock/issues"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "1cb870554e4f1c02a26135d882c80b3e753ebce6"
|
|
63
63
|
}
|