@bedrock-layout/solid 0.2.2 → 0.5.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.umd.js CHANGED
@@ -1 +1,138 @@
1
- (function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.solid={}))})(this,function(e){"use strict";const t=()=>{};e.Stack=t,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"});
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")`
51
+ @property --maxWidth {
52
+ syntax: "<length-percentage>";
53
+ inherits: false;
54
+ initial-value: 100%;
55
+ }
56
+
57
+ --maxWidth: ${e=>it(e.maxWidth)};
58
+
59
+ box-sizing: content-box;
60
+
61
+ margin-inline-start: auto;
62
+ margin-inline-end: auto;
63
+ margin-inline: auto;
64
+
65
+ max-inline-size: var(--maxWidth, 100%);
66
+
67
+ ${e=>e.centerChildren?A`
68
+ display: flex;
69
+ flex-direction: column;
70
+ align-items: center;
71
+ `:""}
72
+
73
+ ${e=>e.centerText?A`
74
+ text-align: center;
75
+ `:""}
76
+ `;function rt(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const lt=T("div")`
77
+ @property --basis {
78
+ syntax: "<length-percentage>";
79
+ inherits: true;
80
+ initial-value: 100%;
81
+ }
82
+
83
+ @property --gutter {
84
+ syntax: "<length-percentage>";
85
+ inherits: false;
86
+ initial-value: 0px;
87
+ }
88
+
89
+ --basis: ${e=>rt(e.basis)};
90
+ --gutter: ${e=>{var t;return e.gutter&&(t=D(e.gutter,e.theme))!=null?t:"0px"}};
91
+
92
+ box-sizing: border-box;
93
+ > * {
94
+ margin: 0;
95
+ flex-basis: var(--basis, 100%);
96
+ flex-grow: ${e=>e.noStretchedColumns?"0":"1"};
97
+ flex-shrink: 1;
98
+ }
99
+
100
+ display: flex;
101
+ flex-wrap: wrap;
102
+ gap: var(--gutter, 0px);
103
+ `;function ot(e){return Array.isArray(e)&&e.length===2&&e.every(Number.isFinite)||typeof e=="string"&&/^\d{1,1000}\/\d{1,1000}$/.test(e)}function ct(e){return Array.isArray(e)?e.join("/"):e}function ut(e){return ot(e)?ct(e):void 0}const ft=T.div`
104
+ box-sizing: border-box;
105
+ display: block;
106
+ inline-size: 100%;
107
+ position: relative;
108
+ overflow: hidden;
109
+
110
+ ${e=>{const t=ut(e.ratio);return t?A`
111
+ aspect-ratio: ${t};
112
+ `:""}};
113
+
114
+ > * {
115
+ position: absolute;
116
+
117
+ inset-block-start: 0;
118
+ inset-block-end: 0;
119
+ inset-inline-start: 0;
120
+ inset-inline-end: 0;
121
+
122
+ inset-block: 0;
123
+ inset-inline: 0;
124
+
125
+ display: flex;
126
+ justify-content: center;
127
+ align-items: center;
128
+ }
129
+
130
+ > :is(img, video) {
131
+ inline-size: 100%;
132
+ block-size: 100%;
133
+ size: 100%;
134
+
135
+ object-fit: cover;
136
+ object-position: ${e=>typeof e.position=="string"?e.position:"50%"};
137
+ }
138
+ `;f.Center=st,f.ColumnDrop=lt,f.Frame=ft,f.Grid=nt,f.Stack=tt,f.checkIsCSSLength=fe,f.getSpacingValue=D,f.spacing=ae,Object.defineProperty(f,"__esModule",{value:!0}),f[Symbol.toStringTag]="Module"});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrock-layout/solid",
3
- "version": "0.2.2",
3
+ "version": "0.5.0",
4
4
  "description": "solid.js port of bedrock-layout primitives",
5
5
  "sideEffects": false,
6
6
  "private": false,
@@ -42,6 +42,10 @@
42
42
  "type": "git",
43
43
  "url": "git+https://github.com/Bedrock-Layouts/Solid-Bedrock.git"
44
44
  },
45
+ "peerDependencies": {
46
+ "solid-js": "^1.3.7",
47
+ "solid-styled-components": "^0.27.4"
48
+ },
45
49
  "scripts": {
46
50
  "test": "echo \"Error: run tests from root\" && exit 1",
47
51
  "lint": "eslint --ignore-path .gitignore .",
@@ -55,5 +59,5 @@
55
59
  "bugs": {
56
60
  "url": "https://github.com/Bedrock-Layouts/Solid-Bedrock/issues"
57
61
  },
58
- "gitHead": "522904cc909019be32c214e10baffa971c12902c"
62
+ "gitHead": "2efc649690c8357f71b5648faa71c14b14714d97"
59
63
  }