@bedrock-layout/solid 0.5.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 +91 -58
- package/lib/index.d.ts +72 -22
- package/lib/index.m.js +176 -62
- package/lib/index.umd.js +90 -57
- package/package.json +2 -2
package/lib/index.cjs.js
CHANGED
|
@@ -1,60 +1,11 @@
|
|
|
1
|
-
"use strict";var de=Object.defineProperty,he=Object.defineProperties;var pe=Object.getOwnPropertyDescriptors;var _=Object.getOwnPropertySymbols;var ye=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable;var z=(e,t,n)=>t in e?de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V=(e,t)=>{for(var n in t||(t={}))ye.call(t,n)&&z(e,n,t[n]);if(_)for(var n of _(t))me.call(t,n)&&z(e,n,t[n]);return e},q=(e,t)=>he(e,pe(t));Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";let xe={data:""},be=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||xe,we=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Se=/\/\*[^]*?\*\/|\s\s+|\n/g,x=(e,t)=>{let n="",i="",r="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":i+=s[1]=="f"?x(o,s):s+"{"+x(o,s[1]=="k"?"":t)+"}":typeof o=="object"?i+=x(o,t?t.replace(/([^,])+/g,l=>s.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=x.p?x.p(s,o):s+":"+o+";")}return n+(t&&r?t+"{"+r+"}":r)+i},A={},te=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+te(e[n]);return t}return e},Ae=(e,t,n,i,r)=>{let s=te(e),o=A[s]||(A[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!A[o]){let l=s!==e?e:(c=>{let u,f=[{}];for(;u=we.exec(c.replace(Se,""));)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);A[o]=x(r?{["@keyframes "+o]:l}:l,n?"":"."+o)}return((l,c,u)=>{c.data.indexOf(l)==-1&&(c.data=u?l+c.data:c.data+l)})(A[o],t,i),o},Ce=(e,t,n)=>e.reduce((i,r,s)=>{let o=t[s];if(o&&o.call){let l=o(n),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;o=c?"."+c:l&&typeof l=="object"?l.props?"":x(l,""):l===!1?"":l}return i+r+(o==null?"":o)},"");function b(e){let t=this||{},n=e.call?e(t.p):e;return Ae(n.unshift?n.raw?Ce(n,[].slice.call(arguments,1),t.p):n.reduce((i,r)=>Object.assign(i,r&&r.call?r(t.p):r),{}):n,be(t.target),t.g,t.o,t.k)}b.bind({g:1});b.bind({k:1});const $e=(e,t)=>e===t,ve=Symbol("solid-proxy"),U={equals:$e};let Ne=re;const T={},m=1,M=2,Ee={owned:null,cleanups:null,context:null,owner:null};var h=null;let v=null,a=null,C=null,g=null,y=null,F=0;function ke(e,t,n){const i=R(e,t,!0,m);N(i)}function $(e,t,n){const i=R(e,t,!1,m);N(i)}function X(e,t,n){n=n?Object.assign({},U,n):U;const i=R(e,t,!0,0);return i.pending=T,i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,N(i),je.bind(i)}function Te(e){if(C)return e();let t;const n=C=[];try{t=e()}finally{C=null}return se(()=>{for(let i=0;i<n.length;i+=1){const r=n[i];if(r.pending!==T){const s=r.pending;r.pending=T,ne(r,s)}}},!1),t}function B(e){let t,n=a;return a=null,t=e(),a=n,t}function Pe(e){const t=Symbol("context");return{id:t,Provider:Me(t),defaultValue:e}}function Le(e){return ue(h,e.id)||e.defaultValue}function Oe(e){const t=X(e);return X(()=>D(t()))}function je(){const e=v;if(this.sources&&(this.state||e)){const t=g;g=null,this.state===m||e?N(this):W(this),g=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 ne(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(C)return e.pending===T&&C.push(e),e.pending=t,t;let i=!1;return e.value=t,e.observers&&e.observers.length&&se(()=>{for(let r=0;r<e.observers.length;r+=1){const s=e.observers[r];i&&v.disposed.has(s),s.pure?g.push(s):y.push(s),s.observers&&(i&&!s.tState||!i&&!s.state)&&le(s),i||(s.state=m)}if(g.length>1e6)throw g=[],new Error},!1),t}function N(e){if(!e.fn)return;oe(e);const t=h,n=a,i=F;a=h=e,De(e,e.value,i),a=n,h=t}function De(e,t,n){let i;try{i=e.fn(t)}catch(r){ce(r)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?ne(e,i):e.value=i,e.updatedAt=n)}function R(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!==Ee&&(h.owned?h.owned.push(s):h.owned=[s]),s}function ie(e){const t=v;if(e.state!==m)return e.state=0;if(e.suspense&&B(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<F);)(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===M||t){const r=g;g=null,W(e,n[0]),g=r}}function se(e,t){if(g)return e();let n=!1;t||(g=[]),y?n=!0:y=[],F++;try{return e()}catch(i){ce(i)}finally{Ie(n)}}function Ie(e){g&&(re(g),g=null),!e&&(y.length?Te(()=>{Ne(y),y=null}):y=null)}function re(e){for(let t=0;t<e.length;t++)ie(e[t])}function W(e,t){e.state=0;const n=v;for(let i=0;i<e.sources.length;i+=1){const r=e.sources[i];r.sources&&(r.state===m||n?r!==t&&ie(r):(r.state===M||n)&&W(r,t))}}function le(e){const t=v;for(let n=0;n<e.observers.length;n+=1){const i=e.observers[n];(!i.state||t)&&(i.state=M,i.pure?g.push(i):y.push(i),i.observers&&le(i))}}function oe(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(),o=n.observerSlots.pop();i<r.length&&(s.sourceSlots[o]=i,r[i]=s,n.observerSlots[i]=o)}}if(e.owned){for(t=0;t<e.owned.length;t++)oe(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 ce(e){throw e}function ue(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&ue(e.owner,t))}function D(e){if(typeof e=="function"&&!e.length)return D(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=D(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function Me(e){return function(n){let i;return ke(()=>i=B(()=>(h.context={[e]:n.value},Oe(()=>n.children)))),i}}function k(){return!0}const fe={get(e,t,n){return t===ve?n:e.get(t)},has(e,t){return e.has(t)},set:k,deleteProperty:k,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:k,deleteProperty:k}},ownKeys(e){return e.keys()}};function j(e){return typeof e=="function"?e():e}function K(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const i=j(e[n])[t];if(i!==void 0)return i}},has(t){for(let n=e.length-1;n>=0;n--)if(t in j(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(j(e[n])));return[...new Set(t)]}},fe)}function G(e,...t){const n=new Set(t.flat()),i=Object.getOwnPropertyDescriptors(e),r=t.map(s=>{const o={};for(let l=0;l<s.length;l++){const c=s[l];Object.defineProperty(o,c,i[c]?i[c]:{get(){return e[c]},set(){return!0}})}return o});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))}},fe)),r}const Fe=["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",...Fe]),Re=new Set(["innerHTML","textContent","innerText","children"]),We={className:"class",htmlFor:"for"},H={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"]),ze={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Ve(e,t,n){let i=n.length,r=t.length,s=i,o=0,l=0,c=t[r-1].nextSibling,u=null;for(;o<r||l<s;){if(t[o]===n[l]){o++,l++;continue}for(;t[r-1]===n[s-1];)r--,s--;if(r===o){const f=s<i?l?n[l-1].nextSibling:n[s-l]:c;for(;l<s;)e.insertBefore(n[l++],f)}else if(s===l)for(;o<r;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[l]===t[r-1]){const f=t[--r].nextSibling;e.insertBefore(n[l++],t[o++].nextSibling),e.insertBefore(n[--s],f),t[r]=n[s]}else{if(!u){u=new Map;let d=l;for(;d<s;)u.set(n[d],d++)}const f=u.get(t[o]);if(f!=null)if(l<f&&f<s){let d=o,p=1,S;for(;++d<r&&d<s&&!((S=u.get(t[d]))==null||S!==f+p);)p++;if(p>f-l){const O=t[o];for(;l<f;)e.insertBefore(n[l++],O)}else e.replaceChild(n[l++],t[o++])}else o++;else t[o++].remove()}}}const Q="_$DX_DELEGATE";function qe(e,t=window.document){const n=t[Q]||(t[Q]=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,Je))}}function Ue(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Xe(e,t,n,i){i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i)}function Ke(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 Ge(e,t,n={}){const i=Object.keys(t||{}),r=Object.keys(n);let s,o;for(s=0,o=r.length;s<o;s++){const l=r[s];!l||l==="undefined"||t[l]||(Y(e,l,!1),delete n[l])}for(s=0,o=i.length;s<o;s++){const l=i[s],c=!!t[l];!l||l==="undefined"||n[l]===c||!c||(Y(e,l,!0),n[l]=c)}return n}function He(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 Qe(e,t,n,i){typeof t=="function"?$(r=>J(e,t(),r,n,i)):J(e,t,void 0,n,i)}function Ye(e,t,n,i,r={}){for(const s in r)if(!(s in t)){if(s==="children")continue;Z(e,s,null,r[s],n)}for(const s in t){if(s==="children"){i||P(e,t.children);continue}const o=t[s];r[s]=Z(e,s,o,r[s],n)}}function Ze(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Y(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 Z(e,t,n,i,r){let s,o,l;if(t==="style")return He(e,n,i);if(t==="classList")return Ge(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=_e.has(c);Ke(e,c,n,u),u&&qe([c])}else if((l=Re.has(t))||!r&&(H[t]||(o=Be.has(t)))||(s=e.nodeName.includes("-")))s&&!o&&!l?e[Ze(t)]=n:e[H[t]||t]=n;else{const c=r&&t.indexOf(":")>-1&&ze[t.split(":")[0]];c?Xe(e,c,t,n):Ue(e,We[t]||t,n)}return n}function Je(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 J(e,t,n={},i,r){return!r&&"children"in t&&$(()=>n.children=P(e,t.children,n.children)),$(()=>Ye(e,t,i,!0,n)),n}function P(e,t,n,i,r){for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,o=i!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,s==="string"||s==="number")if(s==="number"&&(t=t.toString()),o){let l=n[0];l&&l.nodeType===3?l.data=t:l=document.createTextNode(t),n=w(e,n,i,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||s==="boolean")n=w(e,n,i);else{if(s==="function")return $(()=>{let l=t();for(;typeof l=="function";)l=l();n=P(e,l,n,i)}),()=>n;if(Array.isArray(t)){const l=[];if(I(l,t,r))return $(()=>n=P(e,l,n,i,!0)),()=>n;if(l.length===0){if(n=w(e,n,i),o)return n}else Array.isArray(n)?n.length===0?ee(e,l,i):Ve(e,n,l):(n&&w(e),ee(e,l));n=l}else if(t instanceof Node){if(Array.isArray(n)){if(o)return n=w(e,n,i,t);w(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 i=!1;for(let r=0,s=t.length;r<s;r++){let o=t[r],l;if(o instanceof Node)e.push(o);else if(!(o==null||o===!0||o===!1))if(Array.isArray(o))i=I(e,o)||i;else if((l=typeof o)=="string")e.push(document.createTextNode(o));else if(l==="function")if(n){for(;typeof o=="function";)o=o();i=I(e,Array.isArray(o)?o:[o])||i}else e.push(o),i=!0;else e.push(document.createTextNode(o.toString()))}return i}function ee(e,t,n){for(let i=0,r=t.length;i<r;i++)e.insertBefore(t[i],n)}function w(e,t,n,i){if(n===void 0)return e.textContent="";const r=i||document.createTextNode("");if(t.length){let s=!1;for(let o=t.length-1;o>=0;o--){const l=t[o];if(r!==l){const c=l.parentNode===e;!s&&!o?c?e.replaceChild(r,l):e.insertBefore(r,n):c&&l.remove()}else s=!0}}else e.insertBefore(r,n);return[r]}function et(e,...t){}const tt=!1,nt=Pe();function it(e){let t=this||{};return(...n)=>{const i=r=>{const s=Le(nt),o=K(r,{theme:s}),l=K(o,{get className(){const p=o.className,S="className"in o&&/^go[0-9]+/.test(p);let O=b.apply({target:t.target,o:S,p:o,g:t.g},n);return[p,O].filter(Boolean).join(" ")}}),[c,u]=G(l,["as"]),f=c.as||e;let d;if(typeof f=="function")d=f(u);else if(tt){const[p,S]=G(u,["children"]);d=et([`<${f} `,">",`</${f}>`],void 0,p.children||"")}else d=document.createElement(f),Qe(d,u);return d};return i.className=r=>B(()=>b.apply({target:t.target,p:r,g:t.g},n)),i}}const E=new Proxy(it,{get(e,t){return e(t)}});function ae(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 ge={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 st(e){return e.reduce((t,[n,i])=>q(V({},t),{[n]:i}),{})}const L=(e,t)=>{var o,l;const n=(l=(o=t==null?void 0:t.space)!=null?o:t==null?void 0:t.spacing)!=null?l:ge,r=st(Object.entries(n).map(([c,u])=>[c,typeof u=="number"?`${u}px`:u]))[e];return ae(r)?r:void 0},rt=E("div")`
|
|
2
|
-
@property --gutter {
|
|
3
|
-
syntax: "<length-percentage>";
|
|
4
|
-
inherits: false;
|
|
5
|
-
initial-value: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
--gutter: ${e=>{var t;return e.gutter&&(t=L(e.gutter,e.theme))!=null?t:"0px"}};
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
> * {
|
|
11
|
-
margin: 0;
|
|
12
|
-
}
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
|
|
16
|
-
gap: var(--gutter, 0px);
|
|
17
|
-
align-content: start;
|
|
18
|
-
|
|
19
|
-
& > [data-bedrock-column] {
|
|
20
|
-
grid-column: span 1 / auto;
|
|
21
|
-
}
|
|
22
|
-
`,lt=E("div")`
|
|
23
|
-
@property --gutter {
|
|
24
|
-
syntax: "<length-percentage>";
|
|
25
|
-
inherits: false;
|
|
26
|
-
initial-value: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@property --minItemWidth {
|
|
30
|
-
syntax: "<length-percentage>";
|
|
31
|
-
inherits: false;
|
|
32
|
-
initial-value: 639px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
--gutter: ${e=>{var t;return e.gutter&&(t=L(e.gutter,e.theme))!=null?t:"0px"}};
|
|
36
|
-
--minItemWidth: ${e=>{var t;return typeof e.minItemWidth=="string"?e.minItemWidth:`${(t=e.minItemWidth)!=null?t:0}px`}};
|
|
37
|
-
|
|
38
|
-
box-sizing: border-box;
|
|
39
|
-
> * {
|
|
40
|
-
margin: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
display: grid;
|
|
44
|
-
gap: var(--gutter, 0px);
|
|
45
|
-
|
|
46
|
-
grid-template-columns: repeat(
|
|
47
|
-
auto-fit,
|
|
48
|
-
minmax(min(var(--minItemWidth, 639px), 100%), 1fr)
|
|
49
|
-
);
|
|
50
|
-
`;function ot(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const ct=E("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")`
|
|
51
2
|
@property --maxWidth {
|
|
52
3
|
syntax: "<length-percentage>";
|
|
53
4
|
inherits: false;
|
|
54
5
|
initial-value: 100%;
|
|
55
6
|
}
|
|
56
7
|
|
|
57
|
-
--maxWidth: ${e=>
|
|
8
|
+
--maxWidth: ${e=>ct(e.maxWidth)};
|
|
58
9
|
|
|
59
10
|
box-sizing: content-box;
|
|
60
11
|
|
|
@@ -64,16 +15,16 @@
|
|
|
64
15
|
|
|
65
16
|
max-inline-size: var(--maxWidth, 100%);
|
|
66
17
|
|
|
67
|
-
${e=>e.centerChildren?
|
|
18
|
+
${e=>e.centerChildren?w`
|
|
68
19
|
display: flex;
|
|
69
20
|
flex-direction: column;
|
|
70
21
|
align-items: center;
|
|
71
22
|
`:""}
|
|
72
23
|
|
|
73
|
-
${e=>e.centerText?
|
|
24
|
+
${e=>e.centerText?w`
|
|
74
25
|
text-align: center;
|
|
75
26
|
`:""}
|
|
76
|
-
`;function ut(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const ft=
|
|
27
|
+
`;function ut(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const ft=x("div")`
|
|
77
28
|
@property --basis {
|
|
78
29
|
syntax: "<length-percentage>";
|
|
79
30
|
inherits: true;
|
|
@@ -87,7 +38,7 @@
|
|
|
87
38
|
}
|
|
88
39
|
|
|
89
40
|
--basis: ${e=>ut(e.basis)};
|
|
90
|
-
--gutter: ${e=>{var t;return e.gutter&&(t=
|
|
41
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
91
42
|
|
|
92
43
|
box-sizing: border-box;
|
|
93
44
|
> * {
|
|
@@ -100,14 +51,14 @@
|
|
|
100
51
|
display: flex;
|
|
101
52
|
flex-wrap: wrap;
|
|
102
53
|
gap: var(--gutter, 0px);
|
|
103
|
-
`;function
|
|
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`
|
|
104
55
|
box-sizing: border-box;
|
|
105
56
|
display: block;
|
|
106
57
|
inline-size: 100%;
|
|
107
58
|
position: relative;
|
|
108
59
|
overflow: hidden;
|
|
109
60
|
|
|
110
|
-
${e=>{const t=
|
|
61
|
+
${e=>{const t=ht(e.ratio);return t?w`
|
|
111
62
|
aspect-ratio: ${t};
|
|
112
63
|
`:""}};
|
|
113
64
|
|
|
@@ -135,4 +86,86 @@
|
|
|
135
86
|
object-fit: cover;
|
|
136
87
|
object-position: ${e=>typeof e.position=="string"?e.position:"50%"};
|
|
137
88
|
}
|
|
138
|
-
|
|
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
|
+
}
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
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,4 +1,3 @@
|
|
|
1
|
-
import type { JSX } from "solid-js/jsx-runtime";
|
|
2
1
|
import { DefaultTheme } from "solid-styled-components";
|
|
3
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";
|
|
4
3
|
declare type AllCharacter = LowercaseCharacter | Uppercase<LowercaseCharacter>;
|
|
@@ -29,28 +28,14 @@ declare type SpacingOptions = ThemeOrDefaultSpace<DefaultTheme>;
|
|
|
29
28
|
declare type MaybeValue = CSSLength | undefined;
|
|
30
29
|
declare type GetSpacingValue = (spacingKey: SpacingOptions, theme?: Partial<BaseTheme>) => MaybeValue;
|
|
31
30
|
export declare const getSpacingValue: GetSpacingValue;
|
|
32
|
-
export interface StackProps {
|
|
33
|
-
gutter?: SpacingOptions;
|
|
34
|
-
}
|
|
35
|
-
export declare const Stack: ((props: StackProps & JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
36
|
-
className: (props: StackProps & JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
37
|
-
};
|
|
38
|
-
declare type MinItemWidth = number | CSSLength;
|
|
39
|
-
export interface GridProps {
|
|
40
|
-
gutter?: SpacingOptions;
|
|
41
|
-
minItemWidth?: MinItemWidth;
|
|
42
|
-
}
|
|
43
|
-
export declare const Grid: ((props: GridProps & JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
44
|
-
className: (props: GridProps & JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
45
|
-
};
|
|
46
31
|
declare type MaxWidth = number | CSSLength;
|
|
47
32
|
export interface CenterProps {
|
|
48
33
|
maxWidth?: MaxWidth;
|
|
49
34
|
centerText?: boolean;
|
|
50
35
|
centerChildren?: boolean;
|
|
51
36
|
}
|
|
52
|
-
export declare const Center: ((props: CenterProps & JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
53
|
-
className: (props: CenterProps & JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
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;
|
|
54
39
|
};
|
|
55
40
|
declare type Basis = CSSLength | number;
|
|
56
41
|
export interface ColumnDropProps {
|
|
@@ -58,15 +43,80 @@ export interface ColumnDropProps {
|
|
|
58
43
|
basis?: Basis;
|
|
59
44
|
noStretchedColumns?: boolean;
|
|
60
45
|
}
|
|
61
|
-
export declare const ColumnDrop: ((props: ColumnDropProps & JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
62
|
-
className: (props: ColumnDropProps & JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
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;
|
|
63
48
|
};
|
|
64
|
-
declare type
|
|
49
|
+
declare type RatioString = `${number}/${number}` | `${number} / ${number}`;
|
|
50
|
+
declare type Ratio = [number, number] | RatioString;
|
|
65
51
|
export interface FrameProps {
|
|
66
52
|
ratio?: Ratio;
|
|
67
53
|
position?: string;
|
|
68
54
|
}
|
|
69
|
-
export declare const Frame: ((props: FrameProps & JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
70
|
-
className: (props: FrameProps & JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
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
|
+
};
|
|
116
|
+
export interface StackProps {
|
|
117
|
+
gutter?: SpacingOptions;
|
|
118
|
+
}
|
|
119
|
+
export declare const Stack: ((props: StackProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
120
|
+
className: (props: StackProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
71
121
|
};
|
|
72
122
|
export {};
|
package/lib/index.m.js
CHANGED
|
@@ -951,66 +951,6 @@ const getSpacingValue = (spacingKey, theme) => {
|
|
|
951
951
|
const isCSSLength = checkIsCSSLength(spacingVal);
|
|
952
952
|
return isCSSLength ? spacingVal : void 0;
|
|
953
953
|
};
|
|
954
|
-
const Stack = styled("div")`
|
|
955
|
-
@property --gutter {
|
|
956
|
-
syntax: "<length-percentage>";
|
|
957
|
-
inherits: false;
|
|
958
|
-
initial-value: 0;
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
--gutter: ${(props) => {
|
|
962
|
-
var _a;
|
|
963
|
-
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
964
|
-
}};
|
|
965
|
-
box-sizing: border-box;
|
|
966
|
-
> * {
|
|
967
|
-
margin: 0;
|
|
968
|
-
}
|
|
969
|
-
display: flex;
|
|
970
|
-
flex-direction: column;
|
|
971
|
-
|
|
972
|
-
gap: var(--gutter, 0px);
|
|
973
|
-
align-content: start;
|
|
974
|
-
|
|
975
|
-
& > [data-bedrock-column] {
|
|
976
|
-
grid-column: span 1 / auto;
|
|
977
|
-
}
|
|
978
|
-
`;
|
|
979
|
-
const Grid = styled("div")`
|
|
980
|
-
@property --gutter {
|
|
981
|
-
syntax: "<length-percentage>";
|
|
982
|
-
inherits: false;
|
|
983
|
-
initial-value: 0;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
@property --minItemWidth {
|
|
987
|
-
syntax: "<length-percentage>";
|
|
988
|
-
inherits: false;
|
|
989
|
-
initial-value: 639px;
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
--gutter: ${(props) => {
|
|
993
|
-
var _a;
|
|
994
|
-
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
995
|
-
}};
|
|
996
|
-
--minItemWidth: ${(props) => {
|
|
997
|
-
var _a;
|
|
998
|
-
return typeof props.minItemWidth === "string" ? props.minItemWidth : `${(_a = props.minItemWidth) != null ? _a : 0}px`;
|
|
999
|
-
}};
|
|
1000
|
-
|
|
1001
|
-
box-sizing: border-box;
|
|
1002
|
-
> * {
|
|
1003
|
-
margin: 0;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
display: grid;
|
|
1007
|
-
gap: var(--gutter, 0px);
|
|
1008
|
-
|
|
1009
|
-
grid-template-columns: repeat(
|
|
1010
|
-
auto-fit,
|
|
1011
|
-
minmax(min(var(--minItemWidth, 639px), 100%), 1fr)
|
|
1012
|
-
);
|
|
1013
|
-
`;
|
|
1014
954
|
function getSafeMaxWidth(maxWidth) {
|
|
1015
955
|
if (maxWidth === void 0)
|
|
1016
956
|
return "100%";
|
|
@@ -1085,7 +1025,7 @@ const ColumnDrop = styled("div")`
|
|
|
1085
1025
|
`;
|
|
1086
1026
|
function checkIsRatio(ratio) {
|
|
1087
1027
|
const isCorrectArray = Array.isArray(ratio) && ratio.length === 2 && ratio.every(Number.isFinite);
|
|
1088
|
-
return isCorrectArray || typeof ratio === "string" && /^\d{1,1000}
|
|
1028
|
+
return isCorrectArray || typeof ratio === "string" && /^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(ratio);
|
|
1089
1029
|
}
|
|
1090
1030
|
function getRatioString(ratio) {
|
|
1091
1031
|
return Array.isArray(ratio) ? ratio.join("/") : ratio;
|
|
@@ -1136,4 +1076,178 @@ const Frame = styled.div`
|
|
|
1136
1076
|
object-position: ${(props) => typeof props.position === "string" ? props.position : "50%"};
|
|
1137
1077
|
}
|
|
1138
1078
|
`;
|
|
1139
|
-
|
|
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
|
+
`;
|
|
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
|
+
}
|
|
1243
|
+
display: flex;
|
|
1244
|
+
flex-direction: column;
|
|
1245
|
+
|
|
1246
|
+
gap: var(--gutter, 0px);
|
|
1247
|
+
align-content: start;
|
|
1248
|
+
|
|
1249
|
+
& > [data-bedrock-column] {
|
|
1250
|
+
grid-column: span 1 / auto;
|
|
1251
|
+
}
|
|
1252
|
+
`;
|
|
1253
|
+
export { Center, ColumnDrop, Frame, Grid, InlineCluster, PadBox, Reel, Stack, checkIsCSSLength, getSpacingValue, spacing };
|
package/lib/index.umd.js
CHANGED
|
@@ -1,60 +1,11 @@
|
|
|
1
|
-
var at=Object.defineProperty,gt=Object.defineProperties;var dt=Object.getOwnPropertyDescriptors;var ge=Object.getOwnPropertySymbols;var ht=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable;var de=(f,g,y)=>g in f?at(f,g,{enumerable:!0,configurable:!0,writable:!0,value:y}):f[g]=y,he=(f,g)=>{for(var y in g||(g={}))ht.call(g,y)&&de(f,y,g[y]);if(ge)for(var y of ge(g))pt.call(g,y)&&de(f,y,g[y]);return f},pe=(f,g)=>gt(f,dt(g));(function(f,g){typeof exports=="object"&&typeof module!="undefined"?g(exports):typeof define=="function"&&define.amd?define(["exports"],g):(f=typeof globalThis!="undefined"?globalThis:f||self,g(f.solid={}))})(this,function(f){"use strict";let g={data:""},y=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,ye=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,me=/\/\*[^]*?\*\/|\s\s+|\n/g,S=(e,t)=>{let n="",i="",r="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":i+=s[1]=="f"?S(o,s):s+"{"+S(o,s[1]=="k"?"":t)+"}":typeof o=="object"?i+=S(o,t?t.replace(/([^,])+/g,l=>s.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=S.p?S.p(s,o):s+":"+o+";")}return n+(t&&r?t+"{"+r+"}":r)+i},$={},q=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+q(e[n]);return t}return e},be=(e,t,n,i,r)=>{let s=q(e),o=$[s]||($[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!$[o]){let l=s!==e?e:(c=>{let u,a=[{}];for(;u=ye.exec(c.replace(me,""));)u[4]?a.shift():u[3]?a.unshift(a[0][u[3]]=a[0][u[3]]||{}):a[0][u[1]]=u[2];return a[0]})(e);$[o]=S(r?{["@keyframes "+o]:l}:l,n?"":"."+o)}return((l,c,u)=>{c.data.indexOf(l)==-1&&(c.data=u?l+c.data:c.data+l)})($[o],t,i),o},xe=(e,t,n)=>e.reduce((i,r,s)=>{let o=t[s];if(o&&o.call){let l=o(n),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;o=c?"."+c:l&&typeof l=="object"?l.props?"":S(l,""):l===!1?"":l}return i+r+(o==null?"":o)},"");function A(e){let t=this||{},n=e.call?e(t.p):e;return be(n.unshift?n.raw?xe(n,[].slice.call(arguments,1),t.p):n.reduce((i,r)=>Object.assign(i,r&&r.call?r(t.p):r),{}):n,y(t.target),t.g,t.o,t.k)}A.bind({g:1}),A.bind({k:1});const we=(e,t)=>e===t,Se=Symbol("solid-proxy"),U={equals:we};let Ae=Q;const L={},b=1,I=2,Ce={owned:null,cleanups:null,context:null,owner:null};var m=null;let v=null,d=null,N=null,h=null,x=null,M=0;function $e(e,t,n){const i=B(e,t,!0,b);k(i)}function E(e,t,n){const i=B(e,t,!1,b);k(i)}function X(e,t,n){n=n?Object.assign({},U,n):U;const i=B(e,t,!0,0);return i.pending=L,i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,k(i),Te.bind(i)}function ve(e){if(N)return e();let t;const n=N=[];try{t=e()}finally{N=null}return H(()=>{for(let i=0;i<n.length;i+=1){const r=n[i];if(r.pending!==L){const s=r.pending;r.pending=L,K(r,s)}}},!1),t}function F(e){let t,n=d;return d=null,t=e(),d=n,t}function Ne(e){const t=Symbol("context");return{id:t,Provider:Oe(t),defaultValue:e}}function Ee(e){return ee(m,e.id)||e.defaultValue}function ke(e){const t=X(e);return X(()=>W(t()))}function Te(){const e=v;if(this.sources&&(this.state||e)){const t=h;h=null,this.state===b||e?k(this):R(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 K(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(N)return e.pending===L&&N.push(e),e.pending=t,t;let i=!1;return e.value=t,e.observers&&e.observers.length&&H(()=>{for(let r=0;r<e.observers.length;r+=1){const s=e.observers[r];i&&v.disposed.has(s),s.pure?h.push(s):x.push(s),s.observers&&(i&&!s.tState||!i&&!s.state)&&Y(s),i||(s.state=b)}if(h.length>1e6)throw h=[],new Error},!1),t}function k(e){if(!e.fn)return;Z(e);const t=m,n=d,i=M;d=m=e,Pe(e,e.value,i),d=n,m=t}function Pe(e,t,n){let i;try{i=e.fn(t)}catch(r){J(r)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?K(e,i):e.value=i,e.updatedAt=n)}function B(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!==Ce&&(m.owned?m.owned.push(s):m.owned=[s]),s}function G(e){const t=v;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<M);)(e.state||t)&&n.push(e);for(let i=n.length-1;i>=0;i--)if(e=n[i],e.state===b||t)k(e);else if(e.state===I||t){const r=h;h=null,R(e,n[0]),h=r}}function H(e,t){if(h)return e();let n=!1;t||(h=[]),x?n=!0:x=[],M++;try{return e()}catch(i){J(i)}finally{Le(n)}}function Le(e){h&&(Q(h),h=null),!e&&(x.length?ve(()=>{Ae(x),x=null}):x=null)}function Q(e){for(let t=0;t<e.length;t++)G(e[t])}function R(e,t){e.state=0;const n=v;for(let i=0;i<e.sources.length;i+=1){const r=e.sources[i];r.sources&&(r.state===b||n?r!==t&&G(r):(r.state===I||n)&&R(r,t))}}function Y(e){const t=v;for(let n=0;n<e.observers.length;n+=1){const i=e.observers[n];(!i.state||t)&&(i.state=I,i.pure?h.push(i):x.push(i),i.observers&&Y(i))}}function Z(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(),o=n.observerSlots.pop();i<r.length&&(s.sourceSlots[o]=i,r[i]=s,n.observerSlots[i]=o)}}if(e.owned){for(t=0;t<e.owned.length;t++)Z(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 J(e){throw e}function ee(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&ee(e.owner,t))}function W(e){if(typeof e=="function"&&!e.length)return W(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=W(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function Oe(e){return function(n){let i;return $e(()=>i=F(()=>(m.context={[e]:n.value},ke(()=>n.children)))),i}}function O(){return!0}const te={get(e,t,n){return t===Se?n:e.get(t)},has(e,t){return e.has(t)},set:O,deleteProperty:O,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:O,deleteProperty:O}},ownKeys(e){return e.keys()}};function _(e){return typeof e=="function"?e():e}function ne(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const i=_(e[n])[t];if(i!==void 0)return i}},has(t){for(let n=e.length-1;n>=0;n--)if(t in _(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(_(e[n])));return[...new Set(t)]}},te)}function ie(e,...t){const n=new Set(t.flat()),i=Object.getOwnPropertyDescriptors(e),r=t.map(s=>{const o={};for(let l=0;l<s.length;l++){const c=s[l];Object.defineProperty(o,c,i[c]?i[c]:{get(){return e[c]},set(){return!0}})}return o});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))}},te)),r}const je=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],De=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...je]),Ie=new Set(["innerHTML","textContent","innerText","children"]),Me={className:"class",htmlFor:"for"},se={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},Fe=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Be={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Re(e,t,n){let i=n.length,r=t.length,s=i,o=0,l=0,c=t[r-1].nextSibling,u=null;for(;o<r||l<s;){if(t[o]===n[l]){o++,l++;continue}for(;t[r-1]===n[s-1];)r--,s--;if(r===o){const a=s<i?l?n[l-1].nextSibling:n[s-l]:c;for(;l<s;)e.insertBefore(n[l++],a)}else if(s===l)for(;o<r;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[l]===t[r-1]){const a=t[--r].nextSibling;e.insertBefore(n[l++],t[o++].nextSibling),e.insertBefore(n[--s],a),t[r]=n[s]}else{if(!u){u=new Map;let p=l;for(;p<s;)u.set(n[p],p++)}const a=u.get(t[o]);if(a!=null)if(l<a&&a<s){let p=o,w=1,P;for(;++p<r&&p<s&&!((P=u.get(t[p]))==null||P!==a+w);)w++;if(w>a-l){const V=t[o];for(;l<a;)e.insertBefore(n[l++],V)}else e.replaceChild(n[l++],t[o++])}else o++;else t[o++].remove()}}}const re="_$DX_DELEGATE";function We(e,t=window.document){const n=t[re]||(t[re]=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,He))}}function _e(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function ze(e,t,n,i){i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i)}function Ve(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 qe(e,t,n={}){const i=Object.keys(t||{}),r=Object.keys(n);let s,o;for(s=0,o=r.length;s<o;s++){const l=r[s];!l||l==="undefined"||t[l]||(le(e,l,!1),delete n[l])}for(s=0,o=i.length;s<o;s++){const l=i[s],c=!!t[l];!l||l==="undefined"||n[l]===c||!c||(le(e,l,!0),n[l]=c)}return n}function Ue(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 Xe(e,t,n,i){typeof t=="function"?E(r=>ce(e,t(),r,n,i)):ce(e,t,void 0,n,i)}function Ke(e,t,n,i,r={}){for(const s in r)if(!(s in t)){if(s==="children")continue;oe(e,s,null,r[s],n)}for(const s in t){if(s==="children"){i||j(e,t.children);continue}const o=t[s];r[s]=oe(e,s,o,r[s],n)}}function Ge(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function le(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 oe(e,t,n,i,r){let s,o,l;if(t==="style")return Ue(e,n,i);if(t==="classList")return qe(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=Fe.has(c);Ve(e,c,n,u),u&&We([c])}else if((l=Ie.has(t))||!r&&(se[t]||(o=De.has(t)))||(s=e.nodeName.includes("-")))s&&!o&&!l?e[Ge(t)]=n:e[se[t]||t]=n;else{const c=r&&t.indexOf(":")>-1&&Be[t.split(":")[0]];c?ze(e,c,t,n):_e(e,Me[t]||t,n)}return n}function He(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 ce(e,t,n={},i,r){return!r&&"children"in t&&E(()=>n.children=j(e,t.children,n.children)),E(()=>Ke(e,t,i,!0,n)),n}function j(e,t,n,i,r){for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,o=i!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,s==="string"||s==="number")if(s==="number"&&(t=t.toString()),o){let l=n[0];l&&l.nodeType===3?l.data=t:l=document.createTextNode(t),n=C(e,n,i,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||s==="boolean")n=C(e,n,i);else{if(s==="function")return E(()=>{let l=t();for(;typeof l=="function";)l=l();n=j(e,l,n,i)}),()=>n;if(Array.isArray(t)){const l=[];if(z(l,t,r))return E(()=>n=j(e,l,n,i,!0)),()=>n;if(l.length===0){if(n=C(e,n,i),o)return n}else Array.isArray(n)?n.length===0?ue(e,l,i):Re(e,n,l):(n&&C(e),ue(e,l));n=l}else if(t instanceof Node){if(Array.isArray(n)){if(o)return n=C(e,n,i,t);C(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function z(e,t,n){let i=!1;for(let r=0,s=t.length;r<s;r++){let o=t[r],l;if(o instanceof Node)e.push(o);else if(!(o==null||o===!0||o===!1))if(Array.isArray(o))i=z(e,o)||i;else if((l=typeof o)=="string")e.push(document.createTextNode(o));else if(l==="function")if(n){for(;typeof o=="function";)o=o();i=z(e,Array.isArray(o)?o:[o])||i}else e.push(o),i=!0;else e.push(document.createTextNode(o.toString()))}return i}function ue(e,t,n){for(let i=0,r=t.length;i<r;i++)e.insertBefore(t[i],n)}function C(e,t,n,i){if(n===void 0)return e.textContent="";const r=i||document.createTextNode("");if(t.length){let s=!1;for(let o=t.length-1;o>=0;o--){const l=t[o];if(r!==l){const c=l.parentNode===e;!s&&!o?c?e.replaceChild(r,l):e.insertBefore(r,n):c&&l.remove()}else s=!0}}else e.insertBefore(r,n);return[r]}function Qe(e,...t){}function yt(e){}const Ye=!1,Ze=Ne();function Je(e){let t=this||{};return(...n)=>{const i=r=>{const s=Ee(Ze),o=ne(r,{theme:s}),l=ne(o,{get className(){const w=o.className,P="className"in o&&/^go[0-9]+/.test(w);let V=A.apply({target:t.target,o:P,p:o,g:t.g},n);return[w,V].filter(Boolean).join(" ")}}),[c,u]=ie(l,["as"]),a=c.as||e;let p;if(typeof a=="function")p=a(u);else if(Ye){const[w,P]=ie(u,["children"]);p=Qe([`<${a} `,">",`</${a}>`],void 0,w.children||"")}else p=document.createElement(a),Xe(p,u);return p};return i.className=r=>F(()=>A.apply({target:t.target,p:r,g:t.g},n)),i}}const T=new Proxy(Je,{get(e,t){return e(t)}});function fe(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 ae={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 et(e){return e.reduce((t,[n,i])=>pe(he({},t),{[n]:i}),{})}const D=(e,t)=>{var o,l;const n=(l=(o=t==null?void 0:t.space)!=null?o:t==null?void 0:t.spacing)!=null?l:ae,r=et(Object.entries(n).map(([c,u])=>[c,typeof u=="number"?`${u}px`:u]))[e];return fe(r)?r:void 0},tt=T("div")`
|
|
2
|
-
@property --gutter {
|
|
3
|
-
syntax: "<length-percentage>";
|
|
4
|
-
inherits: false;
|
|
5
|
-
initial-value: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
--gutter: ${e=>{var t;return e.gutter&&(t=D(e.gutter,e.theme))!=null?t:"0px"}};
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
> * {
|
|
11
|
-
margin: 0;
|
|
12
|
-
}
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
|
|
16
|
-
gap: var(--gutter, 0px);
|
|
17
|
-
align-content: start;
|
|
18
|
-
|
|
19
|
-
& > [data-bedrock-column] {
|
|
20
|
-
grid-column: span 1 / auto;
|
|
21
|
-
}
|
|
22
|
-
`,nt=T("div")`
|
|
23
|
-
@property --gutter {
|
|
24
|
-
syntax: "<length-percentage>";
|
|
25
|
-
inherits: false;
|
|
26
|
-
initial-value: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@property --minItemWidth {
|
|
30
|
-
syntax: "<length-percentage>";
|
|
31
|
-
inherits: false;
|
|
32
|
-
initial-value: 639px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
--gutter: ${e=>{var t;return e.gutter&&(t=D(e.gutter,e.theme))!=null?t:"0px"}};
|
|
36
|
-
--minItemWidth: ${e=>{var t;return typeof e.minItemWidth=="string"?e.minItemWidth:`${(t=e.minItemWidth)!=null?t:0}px`}};
|
|
37
|
-
|
|
38
|
-
box-sizing: border-box;
|
|
39
|
-
> * {
|
|
40
|
-
margin: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
display: grid;
|
|
44
|
-
gap: var(--gutter, 0px);
|
|
45
|
-
|
|
46
|
-
grid-template-columns: repeat(
|
|
47
|
-
auto-fit,
|
|
48
|
-
minmax(min(var(--minItemWidth, 639px), 100%), 1fr)
|
|
49
|
-
);
|
|
50
|
-
`;function it(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const st=T("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")`
|
|
51
2
|
@property --maxWidth {
|
|
52
3
|
syntax: "<length-percentage>";
|
|
53
4
|
inherits: false;
|
|
54
5
|
initial-value: 100%;
|
|
55
6
|
}
|
|
56
7
|
|
|
57
|
-
--maxWidth: ${e=>
|
|
8
|
+
--maxWidth: ${e=>st(e.maxWidth)};
|
|
58
9
|
|
|
59
10
|
box-sizing: content-box;
|
|
60
11
|
|
|
@@ -73,7 +24,7 @@ var at=Object.defineProperty,gt=Object.defineProperties;var dt=Object.getOwnProp
|
|
|
73
24
|
${e=>e.centerText?A`
|
|
74
25
|
text-align: center;
|
|
75
26
|
`:""}
|
|
76
|
-
`;function
|
|
27
|
+
`;function lt(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const ot=w("div")`
|
|
77
28
|
@property --basis {
|
|
78
29
|
syntax: "<length-percentage>";
|
|
79
30
|
inherits: true;
|
|
@@ -86,8 +37,8 @@ var at=Object.defineProperty,gt=Object.defineProperties;var dt=Object.getOwnProp
|
|
|
86
37
|
initial-value: 0px;
|
|
87
38
|
}
|
|
88
39
|
|
|
89
|
-
--basis: ${e=>
|
|
90
|
-
--gutter: ${e=>{var t;return e.gutter&&(t=
|
|
40
|
+
--basis: ${e=>lt(e.basis)};
|
|
41
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
91
42
|
|
|
92
43
|
box-sizing: border-box;
|
|
93
44
|
> * {
|
|
@@ -100,14 +51,14 @@ var at=Object.defineProperty,gt=Object.defineProperties;var dt=Object.getOwnProp
|
|
|
100
51
|
display: flex;
|
|
101
52
|
flex-wrap: wrap;
|
|
102
53
|
gap: var(--gutter, 0px);
|
|
103
|
-
`;function
|
|
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`
|
|
104
55
|
box-sizing: border-box;
|
|
105
56
|
display: block;
|
|
106
57
|
inline-size: 100%;
|
|
107
58
|
position: relative;
|
|
108
59
|
overflow: hidden;
|
|
109
60
|
|
|
110
|
-
${e=>{const t=
|
|
61
|
+
${e=>{const t=at(e.ratio);return t?A`
|
|
111
62
|
aspect-ratio: ${t};
|
|
112
63
|
`:""}};
|
|
113
64
|
|
|
@@ -135,4 +86,86 @@ var at=Object.defineProperty,gt=Object.defineProperties;var dt=Object.getOwnProp
|
|
|
135
86
|
object-fit: cover;
|
|
136
87
|
object-position: ${e=>typeof e.position=="string"?e.position:"50%"};
|
|
137
88
|
}
|
|
138
|
-
|
|
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
|
+
}
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
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
|
}
|