@bedrock-layout/solid 0.2.2 → 0.3.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 CHANGED
@@ -1 +1,5 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";const e=()=>{};exports.Stack=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";let re={data:""},oe=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||re,fe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ce=/\/\*[^]*?\*\/|\s\s+|\n/g,w=(e,t)=>{let n="",s="",l="";for(let i in e){let o=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+o+";":s+=i[1]=="f"?w(o,i):i+"{"+w(o,i[1]=="k"?"":t)+"}":typeof o=="object"?s+=w(o,t?t.replace(/([^,])+/g,r=>i.replace(/(^:.*)|([^,])+/g,f=>/&/.test(f)?f.replace(/&/g,r):r?r+" "+f:f)):i):o!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=w.p?w.p(i,o):i+":"+o+";")}return n+(t&&l?t+"{"+l+"}":l)+s},S={},Y=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Y(e[n]);return t}return e},ue=(e,t,n,s,l)=>{let i=Y(e),o=S[i]||(S[i]=(r=>{let f=0,c=11;for(;f<r.length;)c=101*c+r.charCodeAt(f++)>>>0;return"go"+c})(i));if(!S[o]){let r=i!==e?e:(f=>{let c,u=[{}];for(;c=fe.exec(f.replace(ce,""));)c[4]?u.shift():c[3]?u.unshift(u[0][c[3]]=u[0][c[3]]||{}):u[0][c[1]]=c[2];return u[0]})(e);S[o]=w(l?{["@keyframes "+o]:r}:r,n?"":"."+o)}return((r,f,c)=>{f.data.indexOf(r)==-1&&(f.data=c?r+f.data:f.data+r)})(S[o],t,s),o},ae=(e,t,n)=>e.reduce((s,l,i)=>{let o=t[i];if(o&&o.call){let r=o(n),f=r&&r.props&&r.props.className||/^go/.test(r)&&r;o=f?"."+f:r&&typeof r=="object"?r.props?"":w(r,""):r===!1?"":r}return s+l+(o==null?"":o)},"");function P(e){let t=this||{},n=e.call?e(t.p):e;return ue(n.unshift?n.raw?ae(n,[].slice.call(arguments,1),t.p):n.reduce((s,l)=>Object.assign(s,l&&l.call?l(t.p):l),{}):n,oe(t.target),t.g,t.o,t.k)}P.bind({g:1});P.bind({k:1});const he=(e,t)=>e===t,ge=Symbol("solid-proxy"),q={equals:he};let de=ee;const L={},m=1,M=2,pe={owned:null,cleanups:null,context:null,owner:null};var d=null;let N=null,a=null,A=null,h=null,y=null,B=0;function ye(e,t,n){const s=F(e,t,!0,m);E(s)}function C(e,t,n){const s=F(e,t,!1,m);E(s)}function U(e,t,n){n=n?Object.assign({},q,n):q;const s=F(e,t,!0,0);return s.pending=L,s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,E(s),Se.bind(s)}function me(e){if(A)return e();let t;const n=A=[];try{t=e()}finally{A=null}return z(()=>{for(let s=0;s<n.length;s+=1){const l=n[s];if(l.pending!==L){const i=l.pending;l.pending=L,Z(l,i)}}},!1),t}function _(e){let t,n=a;return a=null,t=e(),a=n,t}function we(e){const t=Symbol("context");return{id:t,Provider:Ne(t),defaultValue:e}}function be(e){return ie(d,e.id)||e.defaultValue}function xe(e){const t=U(e);return U(()=>j(t()))}function Se(){const e=N;if(this.sources&&(this.state||e)){const t=h;h=null,this.state===m||e?E(this):I(this),h=t}if(a){const t=this.observers?this.observers.length:0;a.sources?(a.sources.push(this),a.sourceSlots.push(t)):(a.sources=[this],a.sourceSlots=[t]),this.observers?(this.observers.push(a),this.observerSlots.push(a.sources.length-1)):(this.observers=[a],this.observerSlots=[a.sources.length-1])}return this.value}function Z(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(A)return e.pending===L&&A.push(e),e.pending=t,t;let s=!1;return e.value=t,e.observers&&e.observers.length&&z(()=>{for(let l=0;l<e.observers.length;l+=1){const i=e.observers[l];s&&N.disposed.has(i),i.pure?h.push(i):y.push(i),i.observers&&(s&&!i.tState||!s&&!i.state)&&te(i),s||(i.state=m)}if(h.length>1e6)throw h=[],new Error},!1),t}function E(e){if(!e.fn)return;ne(e);const t=d,n=a,s=B;a=d=e,Ae(e,e.value,s),a=n,d=t}function Ae(e,t,n){let s;try{s=e.fn(t)}catch(l){se(l)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?Z(e,s):e.value=s,e.updatedAt=n)}function F(e,t,n,s=m,l){const i={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:d,context:null,pure:n};return d===null||d!==pe&&(d.owned?d.owned.push(i):d.owned=[i]),i}function J(e){const t=N;if(e.state!==m)return e.state=0;if(e.suspense&&_(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<B);)(e.state||t)&&n.push(e);for(let s=n.length-1;s>=0;s--)if(e=n[s],e.state===m||t)E(e);else if(e.state===M||t){const l=h;h=null,I(e,n[0]),h=l}}function z(e,t){if(h)return e();let n=!1;t||(h=[]),y?n=!0:y=[],B++;try{return e()}catch(s){se(s)}finally{Ce(n)}}function Ce(e){h&&(ee(h),h=null),!e&&(y.length?me(()=>{de(y),y=null}):y=null)}function ee(e){for(let t=0;t<e.length;t++)J(e[t])}function I(e,t){e.state=0;const n=N;for(let s=0;s<e.sources.length;s+=1){const l=e.sources[s];l.sources&&(l.state===m||n?l!==t&&J(l):(l.state===M||n)&&I(l,t))}}function te(e){const t=N;for(let n=0;n<e.observers.length;n+=1){const s=e.observers[n];(!s.state||t)&&(s.state=M,s.pure?h.push(s):y.push(s),s.observers&&te(s))}}function ne(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const i=l.pop(),o=n.observerSlots.pop();s<l.length&&(i.sourceSlots[o]=s,l[s]=i,n.observerSlots[s]=o)}}if(e.owned){for(t=0;t<e.owned.length;t++)ne(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function se(e){throw e}function ie(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&ie(e.owner,t))}function j(e){if(typeof e=="function"&&!e.length)return j(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=j(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Ne(e){return function(n){let s;return ye(()=>s=_(()=>(d.context={[e]:n.value},xe(()=>n.children)))),s}}function T(){return!0}const le={get(e,t,n){return t===ge?n:e.get(t)},has(e,t){return e.has(t)},set:T,deleteProperty:T,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:T,deleteProperty:T}},ownKeys(e){return e.keys()}};function k(e){return typeof e=="function"?e():e}function X(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const s=k(e[n])[t];if(s!==void 0)return s}},has(t){for(let n=e.length-1;n>=0;n--)if(t in k(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(k(e[n])));return[...new Set(t)]}},le)}function K(e,...t){const n=new Set(t.flat()),s=Object.getOwnPropertyDescriptors(e),l=t.map(i=>{const o={};for(let r=0;r<i.length;r++){const f=i[r];Object.defineProperty(o,f,s[f]?s[f]:{get(){return e[f]},set(){return!0}})}return o});return l.push(new Proxy({get(i){return n.has(i)?void 0:e[i]},has(i){return n.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!n.has(i))}},le)),l}const Ee=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Te=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Ee]),Pe=new Set(["innerHTML","textContent","innerText","children"]),Le={className:"class",htmlFor:"for"},V={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},Oe=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),$e={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function ke(e,t,n){let s=n.length,l=t.length,i=s,o=0,r=0,f=t[l-1].nextSibling,c=null;for(;o<l||r<i;){if(t[o]===n[r]){o++,r++;continue}for(;t[l-1]===n[i-1];)l--,i--;if(l===o){const u=i<s?r?n[r-1].nextSibling:n[i-r]:f;for(;r<i;)e.insertBefore(n[r++],u)}else if(i===r)for(;o<l;)(!c||!c.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[i-1]&&n[r]===t[l-1]){const u=t[--l].nextSibling;e.insertBefore(n[r++],t[o++].nextSibling),e.insertBefore(n[--i],u),t[l]=n[i]}else{if(!c){c=new Map;let g=r;for(;g<i;)c.set(n[g],g++)}const u=c.get(t[o]);if(u!=null)if(r<u&&u<i){let g=o,p=1,x;for(;++g<l&&g<i&&!((x=c.get(t[g]))==null||x!==u+p);)p++;if(p>u-r){const $=t[o];for(;r<u;)e.insertBefore(n[r++],$)}else e.replaceChild(n[r++],t[o++])}else o++;else t[o++].remove()}}}const H="_$DX_DELEGATE";function je(e,t=window.document){const n=t[H]||(t[H]=new Set);for(let s=0,l=e.length;s<l;s++){const i=e[s];n.has(i)||(n.add(i),t.addEventListener(i,Ue))}}function ve(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function De(e,t,n,s){s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s)}function Me(e,t,n,s){s?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,l=>n[0](n[1],l)):e.addEventListener(t,n)}function Be(e,t,n={}){const s=Object.keys(t||{}),l=Object.keys(n);let i,o;for(i=0,o=l.length;i<o;i++){const r=l[i];!r||r==="undefined"||t[r]||(R(e,r,!1),delete n[r])}for(i=0,o=s.length;i<o;i++){const r=s[i],f=!!t[r];!r||r==="undefined"||n[r]===f||!f||(R(e,r,!0),n[r]=f)}return n}function _e(e,t,n={}){const s=e.style;if(t==null||typeof t=="string")return s.cssText=t;typeof n=="string"&&(n={});let l,i;for(i in n)t[i]==null&&s.removeProperty(i),delete n[i];for(i in t)l=t[i],l!==n[i]&&(s.setProperty(i,l),n[i]=l);return n}function Fe(e,t,n,s){typeof t=="function"?C(l=>Q(e,t(),l,n,s)):Q(e,t,void 0,n,s)}function Ie(e,t,n,s,l={}){for(const i in l)if(!(i in t)){if(i==="children")continue;G(e,i,null,l[i],n)}for(const i in t){if(i==="children"){s||O(e,t.children);continue}const o=t[i];l[i]=G(e,i,o,l[i],n)}}function qe(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function R(e,t,n){const s=t.trim().split(/\s+/);for(let l=0,i=s.length;l<i;l++)e.classList.toggle(s[l],n)}function G(e,t,n,s,l){let i,o,r;if(t==="style")return _e(e,n,s);if(t==="classList")return Be(e,n,s);if(n===s)return s;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),c=Oe.has(f);Me(e,f,n,c),c&&je([f])}else if((r=Pe.has(t))||!l&&(V[t]||(o=Te.has(t)))||(i=e.nodeName.includes("-")))i&&!o&&!r?e[qe(t)]=n:e[V[t]||t]=n;else{const f=l&&t.indexOf(":")>-1&&$e[t.split(":")[0]];f?De(e,f,t,n):ve(e,Le[t]||t,n)}return n}function Ue(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const s=n[t];if(s&&!n.disabled){const l=n[`${t}Data`];if(l!==void 0?s(l,e):s(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function Q(e,t,n={},s,l){return!l&&"children"in t&&C(()=>n.children=O(e,t.children,n.children)),C(()=>Ie(e,t,s,!0,n)),n}function O(e,t,n,s,l){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,o=s!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(t=t.toString()),o){let r=n[0];r&&r.nodeType===3?r.data=t:r=document.createTextNode(t),n=b(e,n,s,r)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||i==="boolean")n=b(e,n,s);else{if(i==="function")return C(()=>{let r=t();for(;typeof r=="function";)r=r();n=O(e,r,n,s)}),()=>n;if(Array.isArray(t)){const r=[];if(v(r,t,l))return C(()=>n=O(e,r,n,s,!0)),()=>n;if(r.length===0){if(n=b(e,n,s),o)return n}else Array.isArray(n)?n.length===0?W(e,r,s):ke(e,n,r):(n&&b(e),W(e,r));n=r}else if(t instanceof Node){if(Array.isArray(n)){if(o)return n=b(e,n,s,t);b(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function v(e,t,n){let s=!1;for(let l=0,i=t.length;l<i;l++){let o=t[l],r;if(o instanceof Node)e.push(o);else if(!(o==null||o===!0||o===!1))if(Array.isArray(o))s=v(e,o)||s;else if((r=typeof o)=="string")e.push(document.createTextNode(o));else if(r==="function")if(n){for(;typeof o=="function";)o=o();s=v(e,Array.isArray(o)?o:[o])||s}else e.push(o),s=!0;else e.push(document.createTextNode(o.toString()))}return s}function W(e,t,n){for(let s=0,l=t.length;s<l;s++)e.insertBefore(t[s],n)}function b(e,t,n,s){if(n===void 0)return e.textContent="";const l=s||document.createTextNode("");if(t.length){let i=!1;for(let o=t.length-1;o>=0;o--){const r=t[o];if(l!==r){const f=r.parentNode===e;!i&&!o?f?e.replaceChild(l,r):e.insertBefore(l,n):f&&r.remove()}else i=!0}}else e.insertBefore(l,n);return[l]}function Xe(e,...t){}const Ke=!1,Ve=we();function He(e){let t=this||{};return(...n)=>{const s=l=>{const i=be(Ve),o=X(l,{theme:i}),r=X(o,{get className(){const p=o.className,x="className"in o&&/^go[0-9]+/.test(p);let $=P.apply({target:t.target,o:x,p:o,g:t.g},n);return[p,$].filter(Boolean).join(" ")}}),[f,c]=K(r,["as"]),u=f.as||e;let g;if(typeof u=="function")g=u(c);else if(Ke){const[p,x]=K(c,["children"]);g=Xe([`<${u} `,">",`</${u}>`],void 0,p.children||"")}else g=document.createElement(u),Fe(g,c);return g};return s.className=l=>_(()=>P.apply({target:t.target,p:l,g:t.g},n)),s}}function Re(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const D={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"},Ge=He("div")`
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: ${e=>{var t,n;return(n=D[(t=e.gutter)!=null?t:"none"])!=null?n:D.none}};
5
+ `;exports.Stack=Ge;exports.checkIsCSSLength=Re;exports.spacing=D;
package/lib/index.d.ts CHANGED
@@ -1 +1,29 @@
1
- export declare const Stack: () => undefined;
1
+ declare type LowercaseCharacter = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
2
+ declare type AllCharacter = LowercaseCharacter | Uppercase<LowercaseCharacter>;
3
+ declare type NonEmptyString = `${AllCharacter}${string}`;
4
+ declare type CSSCustomProperties = `var(--${NonEmptyString})`;
5
+ declare type LengthUnit = "vmin" | "vmax" | "vh" | "vw" | "%" | "ch" | "ex" | "em" | "rem" | "in" | "cm" | "mm" | "pt" | "pc" | "px";
6
+ export declare type CSSLength = `${number}${LengthUnit}` | CSSCustomProperties;
7
+ export declare function checkIsCSSLength(str: string): str is CSSLength;
8
+ export interface Spacing {
9
+ none: CSSLength;
10
+ xxs: CSSLength;
11
+ xs: CSSLength;
12
+ sm: CSSLength;
13
+ md: CSSLength;
14
+ mdLg: CSSLength;
15
+ lg: CSSLength;
16
+ lgXl: CSSLength;
17
+ xl: CSSLength;
18
+ xlXXl: CSSLength;
19
+ xxl: CSSLength;
20
+ }
21
+ declare type SpacingOptions = keyof Spacing;
22
+ export declare const spacing: Spacing;
23
+ export interface StackProps {
24
+ gutter?: SpacingOptions;
25
+ }
26
+ export declare const Stack: ((props: StackProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
27
+ className: (props: StackProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
28
+ };
29
+ export {};
package/lib/index.m.js CHANGED
@@ -1,4 +1,922 @@
1
- const Stack = () => {
2
- return void 0;
1
+ let e = { data: "" }, t = (t2) => typeof window == "object" ? ((t2 ? t2.querySelector("#_goober") : window._goober) || Object.assign((t2 || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : t2 || e, l = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, a = /\/\*[^]*?\*\/|\s\s+|\n/g, n = (e2, t2) => {
2
+ let r = "", l2 = "", a2 = "";
3
+ for (let o2 in e2) {
4
+ let s2 = e2[o2];
5
+ o2[0] == "@" ? o2[1] == "i" ? r = o2 + " " + s2 + ";" : l2 += o2[1] == "f" ? n(s2, o2) : o2 + "{" + n(s2, o2[1] == "k" ? "" : t2) + "}" : typeof s2 == "object" ? l2 += n(s2, t2 ? t2.replace(/([^,])+/g, (e3) => o2.replace(/(^:.*)|([^,])+/g, (t3) => /&/.test(t3) ? t3.replace(/&/g, e3) : e3 ? e3 + " " + t3 : t3)) : o2) : s2 != null && (o2 = /^--/.test(o2) ? o2 : o2.replace(/[A-Z]/g, "-$&").toLowerCase(), a2 += n.p ? n.p(o2, s2) : o2 + ":" + s2 + ";");
6
+ }
7
+ return r + (t2 && a2 ? t2 + "{" + a2 + "}" : a2) + l2;
8
+ }, o = {}, s = (e2) => {
9
+ if (typeof e2 == "object") {
10
+ let t2 = "";
11
+ for (let r in e2)
12
+ t2 += r + s(e2[r]);
13
+ return t2;
14
+ }
15
+ return e2;
16
+ }, c = (e2, t2, r, c2, i2) => {
17
+ let u2 = s(e2), p = o[u2] || (o[u2] = ((e3) => {
18
+ let t3 = 0, r2 = 11;
19
+ for (; t3 < e3.length; )
20
+ r2 = 101 * r2 + e3.charCodeAt(t3++) >>> 0;
21
+ return "go" + r2;
22
+ })(u2));
23
+ if (!o[p]) {
24
+ let t3 = u2 !== e2 ? e2 : ((e3) => {
25
+ let t4, r2 = [{}];
26
+ for (; t4 = l.exec(e3.replace(a, "")); )
27
+ t4[4] ? r2.shift() : t4[3] ? r2.unshift(r2[0][t4[3]] = r2[0][t4[3]] || {}) : r2[0][t4[1]] = t4[2];
28
+ return r2[0];
29
+ })(e2);
30
+ o[p] = n(i2 ? { ["@keyframes " + p]: t3 } : t3, r ? "" : "." + p);
31
+ }
32
+ return ((e3, t3, r2) => {
33
+ t3.data.indexOf(e3) == -1 && (t3.data = r2 ? e3 + t3.data : t3.data + e3);
34
+ })(o[p], t2, c2), p;
35
+ }, i = (e2, t2, r) => e2.reduce((e3, l2, a2) => {
36
+ let o2 = t2[a2];
37
+ if (o2 && o2.call) {
38
+ let e4 = o2(r), t3 = e4 && e4.props && e4.props.className || /^go/.test(e4) && e4;
39
+ o2 = t3 ? "." + t3 : e4 && typeof e4 == "object" ? e4.props ? "" : n(e4, "") : e4 === false ? "" : e4;
40
+ }
41
+ return e3 + l2 + (o2 == null ? "" : o2);
42
+ }, "");
43
+ function u(e2) {
44
+ let r = this || {}, l2 = e2.call ? e2(r.p) : e2;
45
+ return c(l2.unshift ? l2.raw ? i(l2, [].slice.call(arguments, 1), r.p) : l2.reduce((e3, t2) => Object.assign(e3, t2 && t2.call ? t2(r.p) : t2), {}) : l2, t(r.target), r.g, r.o, r.k);
46
+ }
47
+ u.bind({ g: 1 });
48
+ u.bind({ k: 1 });
49
+ const equalFn = (a2, b) => a2 === b;
50
+ const $PROXY = Symbol("solid-proxy");
51
+ const signalOptions = {
52
+ equals: equalFn
3
53
  };
4
- export { Stack };
54
+ let runEffects = runQueue;
55
+ const NOTPENDING = {};
56
+ const STALE = 1;
57
+ const PENDING = 2;
58
+ const UNOWNED = {
59
+ owned: null,
60
+ cleanups: null,
61
+ context: null,
62
+ owner: null
63
+ };
64
+ var Owner = null;
65
+ let Transition = null;
66
+ let Listener = null;
67
+ let Pending = null;
68
+ let Updates = null;
69
+ let Effects = null;
70
+ let ExecCount = 0;
71
+ function createComputed(fn, value, options) {
72
+ const c2 = createComputation(fn, value, true, STALE);
73
+ updateComputation(c2);
74
+ }
75
+ function createRenderEffect(fn, value, options) {
76
+ const c2 = createComputation(fn, value, false, STALE);
77
+ updateComputation(c2);
78
+ }
79
+ function createMemo(fn, value, options) {
80
+ options = options ? Object.assign({}, signalOptions, options) : signalOptions;
81
+ const c2 = createComputation(fn, value, true, 0);
82
+ c2.pending = NOTPENDING;
83
+ c2.observers = null;
84
+ c2.observerSlots = null;
85
+ c2.comparator = options.equals || void 0;
86
+ updateComputation(c2);
87
+ return readSignal.bind(c2);
88
+ }
89
+ function batch(fn) {
90
+ if (Pending)
91
+ return fn();
92
+ let result;
93
+ const q = Pending = [];
94
+ try {
95
+ result = fn();
96
+ } finally {
97
+ Pending = null;
98
+ }
99
+ runUpdates(() => {
100
+ for (let i2 = 0; i2 < q.length; i2 += 1) {
101
+ const data = q[i2];
102
+ if (data.pending !== NOTPENDING) {
103
+ const pending = data.pending;
104
+ data.pending = NOTPENDING;
105
+ writeSignal(data, pending);
106
+ }
107
+ }
108
+ }, false);
109
+ return result;
110
+ }
111
+ function untrack(fn) {
112
+ let result, listener = Listener;
113
+ Listener = null;
114
+ result = fn();
115
+ Listener = listener;
116
+ return result;
117
+ }
118
+ function createContext(defaultValue) {
119
+ const id = Symbol("context");
120
+ return {
121
+ id,
122
+ Provider: createProvider(id),
123
+ defaultValue
124
+ };
125
+ }
126
+ function useContext(context) {
127
+ return lookup(Owner, context.id) || context.defaultValue;
128
+ }
129
+ function children(fn) {
130
+ const children2 = createMemo(fn);
131
+ return createMemo(() => resolveChildren(children2()));
132
+ }
133
+ function readSignal() {
134
+ const runningTransition = Transition;
135
+ if (this.sources && (this.state || runningTransition)) {
136
+ const updates = Updates;
137
+ Updates = null;
138
+ this.state === STALE || runningTransition ? updateComputation(this) : lookDownstream(this);
139
+ Updates = updates;
140
+ }
141
+ if (Listener) {
142
+ const sSlot = this.observers ? this.observers.length : 0;
143
+ if (!Listener.sources) {
144
+ Listener.sources = [this];
145
+ Listener.sourceSlots = [sSlot];
146
+ } else {
147
+ Listener.sources.push(this);
148
+ Listener.sourceSlots.push(sSlot);
149
+ }
150
+ if (!this.observers) {
151
+ this.observers = [Listener];
152
+ this.observerSlots = [Listener.sources.length - 1];
153
+ } else {
154
+ this.observers.push(Listener);
155
+ this.observerSlots.push(Listener.sources.length - 1);
156
+ }
157
+ }
158
+ return this.value;
159
+ }
160
+ function writeSignal(node, value, isComp) {
161
+ if (node.comparator) {
162
+ if (node.comparator(node.value, value))
163
+ return value;
164
+ }
165
+ if (Pending) {
166
+ if (node.pending === NOTPENDING)
167
+ Pending.push(node);
168
+ node.pending = value;
169
+ return value;
170
+ }
171
+ let TransitionRunning = false;
172
+ node.value = value;
173
+ if (node.observers && node.observers.length) {
174
+ runUpdates(() => {
175
+ for (let i2 = 0; i2 < node.observers.length; i2 += 1) {
176
+ const o2 = node.observers[i2];
177
+ if (TransitionRunning && Transition.disposed.has(o2))
178
+ ;
179
+ if (o2.pure)
180
+ Updates.push(o2);
181
+ else
182
+ Effects.push(o2);
183
+ if (o2.observers && (TransitionRunning && !o2.tState || !TransitionRunning && !o2.state))
184
+ markUpstream(o2);
185
+ if (TransitionRunning)
186
+ ;
187
+ else
188
+ o2.state = STALE;
189
+ }
190
+ if (Updates.length > 1e6) {
191
+ Updates = [];
192
+ if (false)
193
+ ;
194
+ throw new Error();
195
+ }
196
+ }, false);
197
+ }
198
+ return value;
199
+ }
200
+ function updateComputation(node) {
201
+ if (!node.fn)
202
+ return;
203
+ cleanNode(node);
204
+ const owner = Owner, listener = Listener, time = ExecCount;
205
+ Listener = Owner = node;
206
+ runComputation(node, node.value, time);
207
+ Listener = listener;
208
+ Owner = owner;
209
+ }
210
+ function runComputation(node, value, time) {
211
+ let nextValue;
212
+ try {
213
+ nextValue = node.fn(value);
214
+ } catch (err) {
215
+ handleError(err);
216
+ }
217
+ if (!node.updatedAt || node.updatedAt <= time) {
218
+ if (node.observers && node.observers.length) {
219
+ writeSignal(node, nextValue);
220
+ } else
221
+ node.value = nextValue;
222
+ node.updatedAt = time;
223
+ }
224
+ }
225
+ function createComputation(fn, init, pure, state = STALE, options) {
226
+ const c2 = {
227
+ fn,
228
+ state,
229
+ updatedAt: null,
230
+ owned: null,
231
+ sources: null,
232
+ sourceSlots: null,
233
+ cleanups: null,
234
+ value: init,
235
+ owner: Owner,
236
+ context: null,
237
+ pure
238
+ };
239
+ if (Owner === null)
240
+ ;
241
+ else if (Owner !== UNOWNED) {
242
+ {
243
+ if (!Owner.owned)
244
+ Owner.owned = [c2];
245
+ else
246
+ Owner.owned.push(c2);
247
+ }
248
+ }
249
+ return c2;
250
+ }
251
+ function runTop(node) {
252
+ const runningTransition = Transition;
253
+ if (node.state !== STALE)
254
+ return node.state = 0;
255
+ if (node.suspense && untrack(node.suspense.inFallback))
256
+ return node.suspense.effects.push(node);
257
+ const ancestors = [node];
258
+ while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
259
+ if (node.state || runningTransition)
260
+ ancestors.push(node);
261
+ }
262
+ for (let i2 = ancestors.length - 1; i2 >= 0; i2--) {
263
+ node = ancestors[i2];
264
+ if (node.state === STALE || runningTransition) {
265
+ updateComputation(node);
266
+ } else if (node.state === PENDING || runningTransition) {
267
+ const updates = Updates;
268
+ Updates = null;
269
+ lookDownstream(node, ancestors[0]);
270
+ Updates = updates;
271
+ }
272
+ }
273
+ }
274
+ function runUpdates(fn, init) {
275
+ if (Updates)
276
+ return fn();
277
+ let wait = false;
278
+ if (!init)
279
+ Updates = [];
280
+ if (Effects)
281
+ wait = true;
282
+ else
283
+ Effects = [];
284
+ ExecCount++;
285
+ try {
286
+ return fn();
287
+ } catch (err) {
288
+ handleError(err);
289
+ } finally {
290
+ completeUpdates(wait);
291
+ }
292
+ }
293
+ function completeUpdates(wait) {
294
+ if (Updates) {
295
+ runQueue(Updates);
296
+ Updates = null;
297
+ }
298
+ if (wait)
299
+ return;
300
+ if (Effects.length)
301
+ batch(() => {
302
+ runEffects(Effects);
303
+ Effects = null;
304
+ });
305
+ else {
306
+ Effects = null;
307
+ }
308
+ }
309
+ function runQueue(queue) {
310
+ for (let i2 = 0; i2 < queue.length; i2++)
311
+ runTop(queue[i2]);
312
+ }
313
+ function lookDownstream(node, ignore) {
314
+ node.state = 0;
315
+ const runningTransition = Transition;
316
+ for (let i2 = 0; i2 < node.sources.length; i2 += 1) {
317
+ const source = node.sources[i2];
318
+ if (source.sources) {
319
+ if (source.state === STALE || runningTransition) {
320
+ if (source !== ignore)
321
+ runTop(source);
322
+ } else if (source.state === PENDING || runningTransition)
323
+ lookDownstream(source, ignore);
324
+ }
325
+ }
326
+ }
327
+ function markUpstream(node) {
328
+ const runningTransition = Transition;
329
+ for (let i2 = 0; i2 < node.observers.length; i2 += 1) {
330
+ const o2 = node.observers[i2];
331
+ if (!o2.state || runningTransition) {
332
+ o2.state = PENDING;
333
+ if (o2.pure)
334
+ Updates.push(o2);
335
+ else
336
+ Effects.push(o2);
337
+ o2.observers && markUpstream(o2);
338
+ }
339
+ }
340
+ }
341
+ function cleanNode(node) {
342
+ let i2;
343
+ if (node.sources) {
344
+ while (node.sources.length) {
345
+ const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
346
+ if (obs && obs.length) {
347
+ const n2 = obs.pop(), s2 = source.observerSlots.pop();
348
+ if (index < obs.length) {
349
+ n2.sourceSlots[s2] = index;
350
+ obs[index] = n2;
351
+ source.observerSlots[index] = s2;
352
+ }
353
+ }
354
+ }
355
+ }
356
+ if (node.owned) {
357
+ for (i2 = 0; i2 < node.owned.length; i2++)
358
+ cleanNode(node.owned[i2]);
359
+ node.owned = null;
360
+ }
361
+ if (node.cleanups) {
362
+ for (i2 = 0; i2 < node.cleanups.length; i2++)
363
+ node.cleanups[i2]();
364
+ node.cleanups = null;
365
+ }
366
+ node.state = 0;
367
+ node.context = null;
368
+ }
369
+ function handleError(err) {
370
+ throw err;
371
+ }
372
+ function lookup(owner, key) {
373
+ return owner && (owner.context && owner.context[key] !== void 0 ? owner.context[key] : owner.owner && lookup(owner.owner, key));
374
+ }
375
+ function resolveChildren(children2) {
376
+ if (typeof children2 === "function" && !children2.length)
377
+ return resolveChildren(children2());
378
+ if (Array.isArray(children2)) {
379
+ const results = [];
380
+ for (let i2 = 0; i2 < children2.length; i2++) {
381
+ const result = resolveChildren(children2[i2]);
382
+ Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
383
+ }
384
+ return results;
385
+ }
386
+ return children2;
387
+ }
388
+ function createProvider(id) {
389
+ return function provider(props) {
390
+ let res;
391
+ createComputed(() => res = untrack(() => {
392
+ Owner.context = {
393
+ [id]: props.value
394
+ };
395
+ return children(() => props.children);
396
+ }));
397
+ return res;
398
+ };
399
+ }
400
+ function trueFn() {
401
+ return true;
402
+ }
403
+ const propTraps = {
404
+ get(_, property, receiver) {
405
+ if (property === $PROXY)
406
+ return receiver;
407
+ return _.get(property);
408
+ },
409
+ has(_, property) {
410
+ return _.has(property);
411
+ },
412
+ set: trueFn,
413
+ deleteProperty: trueFn,
414
+ getOwnPropertyDescriptor(_, property) {
415
+ return {
416
+ configurable: true,
417
+ enumerable: true,
418
+ get() {
419
+ return _.get(property);
420
+ },
421
+ set: trueFn,
422
+ deleteProperty: trueFn
423
+ };
424
+ },
425
+ ownKeys(_) {
426
+ return _.keys();
427
+ }
428
+ };
429
+ function resolveSource(s2) {
430
+ return typeof s2 === "function" ? s2() : s2;
431
+ }
432
+ function mergeProps(...sources) {
433
+ return new Proxy({
434
+ get(property) {
435
+ for (let i2 = sources.length - 1; i2 >= 0; i2--) {
436
+ const v = resolveSource(sources[i2])[property];
437
+ if (v !== void 0)
438
+ return v;
439
+ }
440
+ },
441
+ has(property) {
442
+ for (let i2 = sources.length - 1; i2 >= 0; i2--) {
443
+ if (property in resolveSource(sources[i2]))
444
+ return true;
445
+ }
446
+ return false;
447
+ },
448
+ keys() {
449
+ const keys = [];
450
+ for (let i2 = 0; i2 < sources.length; i2++)
451
+ keys.push(...Object.keys(resolveSource(sources[i2])));
452
+ return [...new Set(keys)];
453
+ }
454
+ }, propTraps);
455
+ }
456
+ function splitProps(props, ...keys) {
457
+ const blocked = new Set(keys.flat());
458
+ const descriptors = Object.getOwnPropertyDescriptors(props);
459
+ const res = keys.map((k) => {
460
+ const clone = {};
461
+ for (let i2 = 0; i2 < k.length; i2++) {
462
+ const key = k[i2];
463
+ Object.defineProperty(clone, key, descriptors[key] ? descriptors[key] : {
464
+ get() {
465
+ return props[key];
466
+ },
467
+ set() {
468
+ return true;
469
+ }
470
+ });
471
+ }
472
+ return clone;
473
+ });
474
+ res.push(new Proxy({
475
+ get(property) {
476
+ return blocked.has(property) ? void 0 : props[property];
477
+ },
478
+ has(property) {
479
+ return blocked.has(property) ? false : property in props;
480
+ },
481
+ keys() {
482
+ return Object.keys(props).filter((k) => !blocked.has(k));
483
+ }
484
+ }, propTraps));
485
+ return res;
486
+ }
487
+ const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
488
+ const Properties = /* @__PURE__ */ new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
489
+ const ChildProperties = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]);
490
+ const Aliases = {
491
+ className: "class",
492
+ htmlFor: "for"
493
+ };
494
+ const PropAliases = {
495
+ class: "className",
496
+ formnovalidate: "formNoValidate",
497
+ ismap: "isMap",
498
+ nomodule: "noModule",
499
+ playsinline: "playsInline",
500
+ readonly: "readOnly"
501
+ };
502
+ const DelegatedEvents = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
503
+ const SVGNamespace = {
504
+ xlink: "http://www.w3.org/1999/xlink",
505
+ xml: "http://www.w3.org/XML/1998/namespace"
506
+ };
507
+ function reconcileArrays(parentNode, a2, b) {
508
+ let bLength = b.length, aEnd = a2.length, bEnd = bLength, aStart = 0, bStart = 0, after = a2[aEnd - 1].nextSibling, map = null;
509
+ while (aStart < aEnd || bStart < bEnd) {
510
+ if (a2[aStart] === b[bStart]) {
511
+ aStart++;
512
+ bStart++;
513
+ continue;
514
+ }
515
+ while (a2[aEnd - 1] === b[bEnd - 1]) {
516
+ aEnd--;
517
+ bEnd--;
518
+ }
519
+ if (aEnd === aStart) {
520
+ const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
521
+ while (bStart < bEnd)
522
+ parentNode.insertBefore(b[bStart++], node);
523
+ } else if (bEnd === bStart) {
524
+ while (aStart < aEnd) {
525
+ if (!map || !map.has(a2[aStart]))
526
+ a2[aStart].remove();
527
+ aStart++;
528
+ }
529
+ } else if (a2[aStart] === b[bEnd - 1] && b[bStart] === a2[aEnd - 1]) {
530
+ const node = a2[--aEnd].nextSibling;
531
+ parentNode.insertBefore(b[bStart++], a2[aStart++].nextSibling);
532
+ parentNode.insertBefore(b[--bEnd], node);
533
+ a2[aEnd] = b[bEnd];
534
+ } else {
535
+ if (!map) {
536
+ map = /* @__PURE__ */ new Map();
537
+ let i2 = bStart;
538
+ while (i2 < bEnd)
539
+ map.set(b[i2], i2++);
540
+ }
541
+ const index = map.get(a2[aStart]);
542
+ if (index != null) {
543
+ if (bStart < index && index < bEnd) {
544
+ let i2 = aStart, sequence = 1, t2;
545
+ while (++i2 < aEnd && i2 < bEnd) {
546
+ if ((t2 = map.get(a2[i2])) == null || t2 !== index + sequence)
547
+ break;
548
+ sequence++;
549
+ }
550
+ if (sequence > index - bStart) {
551
+ const node = a2[aStart];
552
+ while (bStart < index)
553
+ parentNode.insertBefore(b[bStart++], node);
554
+ } else
555
+ parentNode.replaceChild(b[bStart++], a2[aStart++]);
556
+ } else
557
+ aStart++;
558
+ } else
559
+ a2[aStart++].remove();
560
+ }
561
+ }
562
+ }
563
+ const $$EVENTS = "_$DX_DELEGATE";
564
+ function delegateEvents(eventNames, document2 = window.document) {
565
+ const e2 = document2[$$EVENTS] || (document2[$$EVENTS] = /* @__PURE__ */ new Set());
566
+ for (let i2 = 0, l2 = eventNames.length; i2 < l2; i2++) {
567
+ const name = eventNames[i2];
568
+ if (!e2.has(name)) {
569
+ e2.add(name);
570
+ document2.addEventListener(name, eventHandler);
571
+ }
572
+ }
573
+ }
574
+ function setAttribute(node, name, value) {
575
+ if (value == null)
576
+ node.removeAttribute(name);
577
+ else
578
+ node.setAttribute(name, value);
579
+ }
580
+ function setAttributeNS(node, namespace, name, value) {
581
+ if (value == null)
582
+ node.removeAttributeNS(namespace, name);
583
+ else
584
+ node.setAttributeNS(namespace, name, value);
585
+ }
586
+ function addEventListener(node, name, handler, delegate) {
587
+ if (delegate) {
588
+ if (Array.isArray(handler)) {
589
+ node[`$$${name}`] = handler[0];
590
+ node[`$$${name}Data`] = handler[1];
591
+ } else
592
+ node[`$$${name}`] = handler;
593
+ } else if (Array.isArray(handler)) {
594
+ node.addEventListener(name, (e2) => handler[0](handler[1], e2));
595
+ } else
596
+ node.addEventListener(name, handler);
597
+ }
598
+ function classList(node, value, prev = {}) {
599
+ const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
600
+ let i2, len;
601
+ for (i2 = 0, len = prevKeys.length; i2 < len; i2++) {
602
+ const key = prevKeys[i2];
603
+ if (!key || key === "undefined" || value[key])
604
+ continue;
605
+ toggleClassKey(node, key, false);
606
+ delete prev[key];
607
+ }
608
+ for (i2 = 0, len = classKeys.length; i2 < len; i2++) {
609
+ const key = classKeys[i2], classValue = !!value[key];
610
+ if (!key || key === "undefined" || prev[key] === classValue || !classValue)
611
+ continue;
612
+ toggleClassKey(node, key, true);
613
+ prev[key] = classValue;
614
+ }
615
+ return prev;
616
+ }
617
+ function style(node, value, prev = {}) {
618
+ const nodeStyle = node.style;
619
+ if (value == null || typeof value === "string")
620
+ return nodeStyle.cssText = value;
621
+ typeof prev === "string" && (prev = {});
622
+ let v, s2;
623
+ for (s2 in prev) {
624
+ value[s2] == null && nodeStyle.removeProperty(s2);
625
+ delete prev[s2];
626
+ }
627
+ for (s2 in value) {
628
+ v = value[s2];
629
+ if (v !== prev[s2]) {
630
+ nodeStyle.setProperty(s2, v);
631
+ prev[s2] = v;
632
+ }
633
+ }
634
+ return prev;
635
+ }
636
+ function spread(node, accessor, isSVG, skipChildren) {
637
+ if (typeof accessor === "function") {
638
+ createRenderEffect((current) => spreadExpression(node, accessor(), current, isSVG, skipChildren));
639
+ } else
640
+ spreadExpression(node, accessor, void 0, isSVG, skipChildren);
641
+ }
642
+ function assign(node, props, isSVG, skipChildren, prevProps = {}) {
643
+ for (const prop in prevProps) {
644
+ if (!(prop in props)) {
645
+ if (prop === "children")
646
+ continue;
647
+ assignProp(node, prop, null, prevProps[prop], isSVG);
648
+ }
649
+ }
650
+ for (const prop in props) {
651
+ if (prop === "children") {
652
+ if (!skipChildren)
653
+ insertExpression(node, props.children);
654
+ continue;
655
+ }
656
+ const value = props[prop];
657
+ prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG);
658
+ }
659
+ }
660
+ function toPropertyName(name) {
661
+ return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
662
+ }
663
+ function toggleClassKey(node, key, value) {
664
+ const classNames = key.trim().split(/\s+/);
665
+ for (let i2 = 0, nameLen = classNames.length; i2 < nameLen; i2++)
666
+ node.classList.toggle(classNames[i2], value);
667
+ }
668
+ function assignProp(node, prop, value, prev, isSVG) {
669
+ let isCE, isProp, isChildProp;
670
+ if (prop === "style")
671
+ return style(node, value, prev);
672
+ if (prop === "classList")
673
+ return classList(node, value, prev);
674
+ if (value === prev)
675
+ return prev;
676
+ if (prop === "ref") {
677
+ value(node);
678
+ } else if (prop.slice(0, 3) === "on:") {
679
+ node.addEventListener(prop.slice(3), value);
680
+ } else if (prop.slice(0, 10) === "oncapture:") {
681
+ node.addEventListener(prop.slice(10), value, true);
682
+ } else if (prop.slice(0, 2) === "on") {
683
+ const name = prop.slice(2).toLowerCase();
684
+ const delegate = DelegatedEvents.has(name);
685
+ addEventListener(node, name, value, delegate);
686
+ delegate && delegateEvents([name]);
687
+ } else if ((isChildProp = ChildProperties.has(prop)) || !isSVG && (PropAliases[prop] || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-"))) {
688
+ if (isCE && !isProp && !isChildProp)
689
+ node[toPropertyName(prop)] = value;
690
+ else
691
+ node[PropAliases[prop] || prop] = value;
692
+ } else {
693
+ const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
694
+ if (ns)
695
+ setAttributeNS(node, ns, prop, value);
696
+ else
697
+ setAttribute(node, Aliases[prop] || prop, value);
698
+ }
699
+ return value;
700
+ }
701
+ function eventHandler(e2) {
702
+ const key = `$$${e2.type}`;
703
+ let node = e2.composedPath && e2.composedPath()[0] || e2.target;
704
+ if (e2.target !== node) {
705
+ Object.defineProperty(e2, "target", {
706
+ configurable: true,
707
+ value: node
708
+ });
709
+ }
710
+ Object.defineProperty(e2, "currentTarget", {
711
+ configurable: true,
712
+ get() {
713
+ return node || document;
714
+ }
715
+ });
716
+ while (node !== null) {
717
+ const handler = node[key];
718
+ if (handler && !node.disabled) {
719
+ const data = node[`${key}Data`];
720
+ data !== void 0 ? handler(data, e2) : handler(e2);
721
+ if (e2.cancelBubble)
722
+ return;
723
+ }
724
+ node = node.host && node.host !== node && node.host instanceof Node ? node.host : node.parentNode;
725
+ }
726
+ }
727
+ function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
728
+ if (!skipChildren && "children" in props) {
729
+ createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
730
+ }
731
+ createRenderEffect(() => assign(node, props, isSVG, true, prevProps));
732
+ return prevProps;
733
+ }
734
+ function insertExpression(parent, value, current, marker, unwrapArray) {
735
+ while (typeof current === "function")
736
+ current = current();
737
+ if (value === current)
738
+ return current;
739
+ const t2 = typeof value, multi = marker !== void 0;
740
+ parent = multi && current[0] && current[0].parentNode || parent;
741
+ if (t2 === "string" || t2 === "number") {
742
+ if (t2 === "number")
743
+ value = value.toString();
744
+ if (multi) {
745
+ let node = current[0];
746
+ if (node && node.nodeType === 3) {
747
+ node.data = value;
748
+ } else
749
+ node = document.createTextNode(value);
750
+ current = cleanChildren(parent, current, marker, node);
751
+ } else {
752
+ if (current !== "" && typeof current === "string") {
753
+ current = parent.firstChild.data = value;
754
+ } else
755
+ current = parent.textContent = value;
756
+ }
757
+ } else if (value == null || t2 === "boolean") {
758
+ current = cleanChildren(parent, current, marker);
759
+ } else if (t2 === "function") {
760
+ createRenderEffect(() => {
761
+ let v = value();
762
+ while (typeof v === "function")
763
+ v = v();
764
+ current = insertExpression(parent, v, current, marker);
765
+ });
766
+ return () => current;
767
+ } else if (Array.isArray(value)) {
768
+ const array = [];
769
+ if (normalizeIncomingArray(array, value, unwrapArray)) {
770
+ createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
771
+ return () => current;
772
+ }
773
+ if (array.length === 0) {
774
+ current = cleanChildren(parent, current, marker);
775
+ if (multi)
776
+ return current;
777
+ } else if (Array.isArray(current)) {
778
+ if (current.length === 0) {
779
+ appendNodes(parent, array, marker);
780
+ } else
781
+ reconcileArrays(parent, current, array);
782
+ } else {
783
+ current && cleanChildren(parent);
784
+ appendNodes(parent, array);
785
+ }
786
+ current = array;
787
+ } else if (value instanceof Node) {
788
+ if (Array.isArray(current)) {
789
+ if (multi)
790
+ return current = cleanChildren(parent, current, marker, value);
791
+ cleanChildren(parent, current, null, value);
792
+ } else if (current == null || current === "" || !parent.firstChild) {
793
+ parent.appendChild(value);
794
+ } else
795
+ parent.replaceChild(value, parent.firstChild);
796
+ current = value;
797
+ } else
798
+ ;
799
+ return current;
800
+ }
801
+ function normalizeIncomingArray(normalized, array, unwrap) {
802
+ let dynamic = false;
803
+ for (let i2 = 0, len = array.length; i2 < len; i2++) {
804
+ let item = array[i2], t2;
805
+ if (item instanceof Node) {
806
+ normalized.push(item);
807
+ } else if (item == null || item === true || item === false)
808
+ ;
809
+ else if (Array.isArray(item)) {
810
+ dynamic = normalizeIncomingArray(normalized, item) || dynamic;
811
+ } else if ((t2 = typeof item) === "string") {
812
+ normalized.push(document.createTextNode(item));
813
+ } else if (t2 === "function") {
814
+ if (unwrap) {
815
+ while (typeof item === "function")
816
+ item = item();
817
+ dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item]) || dynamic;
818
+ } else {
819
+ normalized.push(item);
820
+ dynamic = true;
821
+ }
822
+ } else
823
+ normalized.push(document.createTextNode(item.toString()));
824
+ }
825
+ return dynamic;
826
+ }
827
+ function appendNodes(parent, array, marker) {
828
+ for (let i2 = 0, len = array.length; i2 < len; i2++)
829
+ parent.insertBefore(array[i2], marker);
830
+ }
831
+ function cleanChildren(parent, current, marker, replacement) {
832
+ if (marker === void 0)
833
+ return parent.textContent = "";
834
+ const node = replacement || document.createTextNode("");
835
+ if (current.length) {
836
+ let inserted = false;
837
+ for (let i2 = current.length - 1; i2 >= 0; i2--) {
838
+ const el = current[i2];
839
+ if (node !== el) {
840
+ const isParent = el.parentNode === parent;
841
+ if (!inserted && !i2)
842
+ isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
843
+ else
844
+ isParent && el.remove();
845
+ } else
846
+ inserted = true;
847
+ }
848
+ } else
849
+ parent.insertBefore(node, marker);
850
+ return [node];
851
+ }
852
+ function ssr(template, ...nodes) {
853
+ }
854
+ function ssrSpread(accessor) {
855
+ }
856
+ const isServer = false;
857
+ const ThemeContext = createContext();
858
+ function styled(tag) {
859
+ let _ctx = this || {};
860
+ return (...args) => {
861
+ const Styled = (props) => {
862
+ const theme = useContext(ThemeContext);
863
+ const withTheme = mergeProps(props, { theme });
864
+ const clone = mergeProps(withTheme, {
865
+ get className() {
866
+ const pClassName = withTheme.className, append = "className" in withTheme && /^go[0-9]+/.test(pClassName);
867
+ let className = u.apply({ target: _ctx.target, o: append, p: withTheme, g: _ctx.g }, args);
868
+ return [pClassName, className].filter(Boolean).join(" ");
869
+ }
870
+ });
871
+ const [local, newProps] = splitProps(clone, ["as"]);
872
+ const createTag = local.as || tag;
873
+ let el;
874
+ if (typeof createTag === "function") {
875
+ el = createTag(newProps);
876
+ } else if (isServer) {
877
+ const [local2, others] = splitProps(newProps, ["children"]);
878
+ el = ssr([`<${createTag} `, ">", `</${createTag}>`], ssrSpread(), local2.children || "");
879
+ } else {
880
+ el = document.createElement(createTag);
881
+ spread(el, newProps);
882
+ }
883
+ return el;
884
+ };
885
+ Styled.className = (props) => {
886
+ return untrack(() => {
887
+ return u.apply({ target: _ctx.target, p: props, g: _ctx.g }, args);
888
+ });
889
+ };
890
+ return Styled;
891
+ };
892
+ }
893
+ function checkIsCSSLength(str) {
894
+ if (typeof str !== "string")
895
+ return false;
896
+ return [
897
+ /^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,
898
+ /^var\(--\D{1,100}\)$/
899
+ ].some((regex) => regex.test(str));
900
+ }
901
+ const spacing = {
902
+ none: "0px",
903
+ xxs: "0.0625rem",
904
+ xs: "0.125rem",
905
+ sm: "0.25rem",
906
+ md: "0.5rem",
907
+ mdLg: "0.75rem",
908
+ lg: "1rem",
909
+ lgXl: "1.5rem",
910
+ xl: "2rem",
911
+ xlXXl: "3rem",
912
+ xxl: "4rem"
913
+ };
914
+ const Stack = styled("div")`
915
+ display: flex;
916
+ flex-direction: column;
917
+ gap: ${(props) => {
918
+ var _a, _b;
919
+ return (_b = spacing[(_a = props.gutter) != null ? _a : "none"]) != null ? _b : spacing.none;
920
+ }};
921
+ `;
922
+ export { Stack, checkIsCSSLength, spacing };
package/lib/index.umd.js CHANGED
@@ -1 +1,5 @@
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
+ (function(p,S){typeof exports=="object"&&typeof module!="undefined"?S(exports):typeof define=="function"&&define.amd?define(["exports"],S):(p=typeof globalThis!="undefined"?globalThis:p||self,S(p.solid={}))})(this,function(p){"use strict";let S={data:""},fe=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||S,ue=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ce=/\/\*[^]*?\*\/|\s\s+|\n/g,b=(e,t)=>{let n="",s="",l="";for(let i in e){let r=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+r+";":s+=i[1]=="f"?b(r,i):i+"{"+b(r,i[1]=="k"?"":t)+"}":typeof r=="object"?s+=b(r,t?t.replace(/([^,])+/g,o=>i.replace(/(^:.*)|([^,])+/g,f=>/&/.test(f)?f.replace(/&/g,o):o?o+" "+f:f)):i):r!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=b.p?b.p(i,r):i+":"+r+";")}return n+(t&&l?t+"{"+l+"}":l)+s},A={},X=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+X(e[n]);return t}return e},ae=(e,t,n,s,l)=>{let i=X(e),r=A[i]||(A[i]=(o=>{let f=0,u=11;for(;f<o.length;)u=101*u+o.charCodeAt(f++)>>>0;return"go"+u})(i));if(!A[r]){let o=i!==e?e:(f=>{let u,c=[{}];for(;u=ue.exec(f.replace(ce,""));)u[4]?c.shift():u[3]?c.unshift(c[0][u[3]]=c[0][u[3]]||{}):c[0][u[1]]=u[2];return c[0]})(e);A[r]=b(l?{["@keyframes "+r]:o}:o,n?"":"."+r)}return((o,f,u)=>{f.data.indexOf(o)==-1&&(f.data=u?o+f.data:f.data+o)})(A[r],t,s),r},he=(e,t,n)=>e.reduce((s,l,i)=>{let r=t[i];if(r&&r.call){let o=r(n),f=o&&o.props&&o.props.className||/^go/.test(o)&&o;r=f?"."+f:o&&typeof o=="object"?o.props?"":b(o,""):o===!1?"":o}return s+l+(r==null?"":r)},"");function L(e){let t=this||{},n=e.call?e(t.p):e;return ae(n.unshift?n.raw?he(n,[].slice.call(arguments,1),t.p):n.reduce((s,l)=>Object.assign(s,l&&l.call?l(t.p):l),{}):n,fe(t.target),t.g,t.o,t.k)}L.bind({g:1}),L.bind({k:1});const de=(e,t)=>e===t,ge=Symbol("solid-proxy"),K={equals:de};let pe=Q;const O={},y=1,j=2,ye={owned:null,cleanups:null,context:null,owner:null};var g=null;let C=null,a=null,N=null,h=null,m=null,v=0;function me(e,t,n){const s=M(e,t,!0,y);T(s)}function E(e,t,n){const s=M(e,t,!1,y);T(s)}function V(e,t,n){n=n?Object.assign({},K,n):K;const s=M(e,t,!0,0);return s.pending=O,s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,T(s),Ae.bind(s)}function we(e){if(N)return e();let t;const n=N=[];try{t=e()}finally{N=null}return G(()=>{for(let s=0;s<n.length;s+=1){const l=n[s];if(l.pending!==O){const i=l.pending;l.pending=O,H(l,i)}}},!1),t}function D(e){let t,n=a;return a=null,t=e(),a=n,t}function be(e){const t=Symbol("context");return{id:t,Provider:Ee(t),defaultValue:e}}function xe(e){return J(g,e.id)||e.defaultValue}function Se(e){const t=V(e);return V(()=>_(t()))}function Ae(){const e=C;if(this.sources&&(this.state||e)){const t=h;h=null,this.state===y||e?T(this):B(this),h=t}if(a){const t=this.observers?this.observers.length:0;a.sources?(a.sources.push(this),a.sourceSlots.push(t)):(a.sources=[this],a.sourceSlots=[t]),this.observers?(this.observers.push(a),this.observerSlots.push(a.sources.length-1)):(this.observers=[a],this.observerSlots=[a.sources.length-1])}return this.value}function H(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(N)return e.pending===O&&N.push(e),e.pending=t,t;let s=!1;return e.value=t,e.observers&&e.observers.length&&G(()=>{for(let l=0;l<e.observers.length;l+=1){const i=e.observers[l];s&&C.disposed.has(i),i.pure?h.push(i):m.push(i),i.observers&&(s&&!i.tState||!s&&!i.state)&&W(i),s||(i.state=y)}if(h.length>1e6)throw h=[],new Error},!1),t}function T(e){if(!e.fn)return;Y(e);const t=g,n=a,s=v;a=g=e,Ce(e,e.value,s),a=n,g=t}function Ce(e,t,n){let s;try{s=e.fn(t)}catch(l){Z(l)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?H(e,s):e.value=s,e.updatedAt=n)}function M(e,t,n,s=y,l){const i={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:g,context:null,pure:n};return g===null||g!==ye&&(g.owned?g.owned.push(i):g.owned=[i]),i}function R(e){const t=C;if(e.state!==y)return e.state=0;if(e.suspense&&D(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<v);)(e.state||t)&&n.push(e);for(let s=n.length-1;s>=0;s--)if(e=n[s],e.state===y||t)T(e);else if(e.state===j||t){const l=h;h=null,B(e,n[0]),h=l}}function G(e,t){if(h)return e();let n=!1;t||(h=[]),m?n=!0:m=[],v++;try{return e()}catch(s){Z(s)}finally{Ne(n)}}function Ne(e){h&&(Q(h),h=null),!e&&(m.length?we(()=>{pe(m),m=null}):m=null)}function Q(e){for(let t=0;t<e.length;t++)R(e[t])}function B(e,t){e.state=0;const n=C;for(let s=0;s<e.sources.length;s+=1){const l=e.sources[s];l.sources&&(l.state===y||n?l!==t&&R(l):(l.state===j||n)&&B(l,t))}}function W(e){const t=C;for(let n=0;n<e.observers.length;n+=1){const s=e.observers[n];(!s.state||t)&&(s.state=j,s.pure?h.push(s):m.push(s),s.observers&&W(s))}}function Y(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const i=l.pop(),r=n.observerSlots.pop();s<l.length&&(i.sourceSlots[r]=s,l[s]=i,n.observerSlots[s]=r)}}if(e.owned){for(t=0;t<e.owned.length;t++)Y(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function Z(e){throw e}function J(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&J(e.owner,t))}function _(e){if(typeof e=="function"&&!e.length)return _(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=_(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Ee(e){return function(n){let s;return me(()=>s=D(()=>(g.context={[e]:n.value},Se(()=>n.children)))),s}}function $(){return!0}const z={get(e,t,n){return t===ge?n:e.get(t)},has(e,t){return e.has(t)},set:$,deleteProperty:$,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:$,deleteProperty:$}},ownKeys(e){return e.keys()}};function F(e){return typeof e=="function"?e():e}function ee(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const s=F(e[n])[t];if(s!==void 0)return s}},has(t){for(let n=e.length-1;n>=0;n--)if(t in F(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(F(e[n])));return[...new Set(t)]}},z)}function te(e,...t){const n=new Set(t.flat()),s=Object.getOwnPropertyDescriptors(e),l=t.map(i=>{const r={};for(let o=0;o<i.length;o++){const f=i[o];Object.defineProperty(r,f,s[f]?s[f]:{get(){return e[f]},set(){return!0}})}return r});return l.push(new Proxy({get(i){return n.has(i)?void 0:e[i]},has(i){return n.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!n.has(i))}},z)),l}const Te=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Pe=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Te]),Le=new Set(["innerHTML","textContent","innerText","children"]),Oe={className:"class",htmlFor:"for"},ne={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},$e=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),ke={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function je(e,t,n){let s=n.length,l=t.length,i=s,r=0,o=0,f=t[l-1].nextSibling,u=null;for(;r<l||o<i;){if(t[r]===n[o]){r++,o++;continue}for(;t[l-1]===n[i-1];)l--,i--;if(l===r){const c=i<s?o?n[o-1].nextSibling:n[i-o]:f;for(;o<i;)e.insertBefore(n[o++],c)}else if(i===o)for(;r<l;)(!u||!u.has(t[r]))&&t[r].remove(),r++;else if(t[r]===n[i-1]&&n[o]===t[l-1]){const c=t[--l].nextSibling;e.insertBefore(n[o++],t[r++].nextSibling),e.insertBefore(n[--i],c),t[l]=n[i]}else{if(!u){u=new Map;let d=o;for(;d<i;)u.set(n[d],d++)}const c=u.get(t[r]);if(c!=null)if(o<c&&c<i){let d=r,w=1,P;for(;++d<l&&d<i&&!((P=u.get(t[d]))==null||P!==c+w);)w++;if(w>c-o){const U=t[r];for(;o<c;)e.insertBefore(n[o++],U)}else e.replaceChild(n[o++],t[r++])}else r++;else t[r++].remove()}}}const se="_$DX_DELEGATE";function ve(e,t=window.document){const n=t[se]||(t[se]=new Set);for(let s=0,l=e.length;s<l;s++){const i=e[s];n.has(i)||(n.add(i),t.addEventListener(i,Xe))}}function De(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Me(e,t,n,s){s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s)}function Be(e,t,n,s){s?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,l=>n[0](n[1],l)):e.addEventListener(t,n)}function _e(e,t,n={}){const s=Object.keys(t||{}),l=Object.keys(n);let i,r;for(i=0,r=l.length;i<r;i++){const o=l[i];!o||o==="undefined"||t[o]||(ie(e,o,!1),delete n[o])}for(i=0,r=s.length;i<r;i++){const o=s[i],f=!!t[o];!o||o==="undefined"||n[o]===f||!f||(ie(e,o,!0),n[o]=f)}return n}function Fe(e,t,n={}){const s=e.style;if(t==null||typeof t=="string")return s.cssText=t;typeof n=="string"&&(n={});let l,i;for(i in n)t[i]==null&&s.removeProperty(i),delete n[i];for(i in t)l=t[i],l!==n[i]&&(s.setProperty(i,l),n[i]=l);return n}function Ie(e,t,n,s){typeof t=="function"?E(l=>oe(e,t(),l,n,s)):oe(e,t,void 0,n,s)}function qe(e,t,n,s,l={}){for(const i in l)if(!(i in t)){if(i==="children")continue;le(e,i,null,l[i],n)}for(const i in t){if(i==="children"){s||k(e,t.children);continue}const r=t[i];l[i]=le(e,i,r,l[i],n)}}function Ue(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function ie(e,t,n){const s=t.trim().split(/\s+/);for(let l=0,i=s.length;l<i;l++)e.classList.toggle(s[l],n)}function le(e,t,n,s,l){let i,r,o;if(t==="style")return Fe(e,n,s);if(t==="classList")return _e(e,n,s);if(n===s)return s;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),u=$e.has(f);Be(e,f,n,u),u&&ve([f])}else if((o=Le.has(t))||!l&&(ne[t]||(r=Pe.has(t)))||(i=e.nodeName.includes("-")))i&&!r&&!o?e[Ue(t)]=n:e[ne[t]||t]=n;else{const f=l&&t.indexOf(":")>-1&&ke[t.split(":")[0]];f?Me(e,f,t,n):De(e,Oe[t]||t,n)}return n}function Xe(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const s=n[t];if(s&&!n.disabled){const l=n[`${t}Data`];if(l!==void 0?s(l,e):s(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function oe(e,t,n={},s,l){return!l&&"children"in t&&E(()=>n.children=k(e,t.children,n.children)),E(()=>qe(e,t,s,!0,n)),n}function k(e,t,n,s,l){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,r=s!==void 0;if(e=r&&n[0]&&n[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(t=t.toString()),r){let o=n[0];o&&o.nodeType===3?o.data=t:o=document.createTextNode(t),n=x(e,n,s,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||i==="boolean")n=x(e,n,s);else{if(i==="function")return E(()=>{let o=t();for(;typeof o=="function";)o=o();n=k(e,o,n,s)}),()=>n;if(Array.isArray(t)){const o=[];if(I(o,t,l))return E(()=>n=k(e,o,n,s,!0)),()=>n;if(o.length===0){if(n=x(e,n,s),r)return n}else Array.isArray(n)?n.length===0?re(e,o,s):je(e,n,o):(n&&x(e),re(e,o));n=o}else if(t instanceof Node){if(Array.isArray(n)){if(r)return n=x(e,n,s,t);x(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function I(e,t,n){let s=!1;for(let l=0,i=t.length;l<i;l++){let r=t[l],o;if(r instanceof Node)e.push(r);else if(!(r==null||r===!0||r===!1))if(Array.isArray(r))s=I(e,r)||s;else if((o=typeof r)=="string")e.push(document.createTextNode(r));else if(o==="function")if(n){for(;typeof r=="function";)r=r();s=I(e,Array.isArray(r)?r:[r])||s}else e.push(r),s=!0;else e.push(document.createTextNode(r.toString()))}return s}function re(e,t,n){for(let s=0,l=t.length;s<l;s++)e.insertBefore(t[s],n)}function x(e,t,n,s){if(n===void 0)return e.textContent="";const l=s||document.createTextNode("");if(t.length){let i=!1;for(let r=t.length-1;r>=0;r--){const o=t[r];if(l!==o){const f=o.parentNode===e;!i&&!r?f?e.replaceChild(l,o):e.insertBefore(l,n):f&&o.remove()}else i=!0}}else e.insertBefore(l,n);return[l]}function Ke(e,...t){}function We(e){}const Ve=!1,He=be();function Re(e){let t=this||{};return(...n)=>{const s=l=>{const i=xe(He),r=ee(l,{theme:i}),o=ee(r,{get className(){const w=r.className,P="className"in r&&/^go[0-9]+/.test(w);let U=L.apply({target:t.target,o:P,p:r,g:t.g},n);return[w,U].filter(Boolean).join(" ")}}),[f,u]=te(o,["as"]),c=f.as||e;let d;if(typeof c=="function")d=c(u);else if(Ve){const[w,P]=te(u,["children"]);d=Ke([`<${c} `,">",`</${c}>`],void 0,w.children||"")}else d=document.createElement(c),Ie(d,u);return d};return s.className=l=>D(()=>L.apply({target:t.target,p:l,g:t.g},n)),s}}function Ge(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const q={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"},Qe=Re("div")`
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: ${e=>{var t,n;return(n=q[(t=e.gutter)!=null?t:"none"])!=null?n:q.none}};
5
+ `;p.Stack=Qe,p.checkIsCSSLength=Ge,p.spacing=q,Object.defineProperty(p,"__esModule",{value:!0}),p[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.3.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": "243b92548bf6db9ca2fc5f6406238788484d9946"
59
63
  }