@bedrock-layout/solid 1.5.0 → 1.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.
@@ -3,7 +3,11 @@ import { CSSLength, SizesOptions, SpacingOptions } from "./spacing-constants";
3
3
  import { HeadlessPropsWithRef, ValidConstructor } from "./typeUtils";
4
4
  type MinItemWidth = CSSLength | number | SizesOptions | "fit-content" | "max-content" | "min-content" | "auto";
5
5
  export interface ColumnDropBaseProps {
6
+ /**
7
+ * @deprecated Use `gap` instead
8
+ */
6
9
  gutter?: SpacingOptions;
10
+ gap?: SpacingOptions;
7
11
  minItemWidth?: MinItemWidth;
8
12
  noStretchedColumns?: boolean;
9
13
  }
package/lib/columns.d.ts CHANGED
@@ -2,7 +2,11 @@ import { JSX } from "solid-js";
2
2
  import { CSSLength, SizesOptions, SpacingOptions } from "./spacing-constants";
3
3
  import { HeadlessPropsWithRef, ValidConstructor } from "./typeUtils";
4
4
  interface ColumnsBaseProps {
5
+ /**
6
+ * @deprecated Use `gap` instead
7
+ */
5
8
  gutter?: SpacingOptions;
9
+ gap?: SpacingOptions;
6
10
  /**
7
11
  * @deprecated Use `colCount` instead.
8
12
  */
package/lib/cover.d.ts CHANGED
@@ -3,7 +3,11 @@ import { CSSLength, SpacingOptions } from "./spacing-constants";
3
3
  import { HeadlessPropsWithRef, ValidConstructor } from "./typeUtils";
4
4
  type MinHeight = CSSLength | number;
5
5
  interface CoverWrapperBaseProps {
6
+ /**
7
+ * @deprecated Use `gap` instead
8
+ */
6
9
  gutter?: SpacingOptions;
10
+ gap?: SpacingOptions;
7
11
  minHeight?: MinHeight;
8
12
  stretchContent?: boolean;
9
13
  }
package/lib/grid.d.ts CHANGED
@@ -3,7 +3,11 @@ import { CSSLength, SizesOptions, SpacingOptions } from "./spacing-constants";
3
3
  import { HeadlessPropsWithRef, ValidConstructor } from "./typeUtils";
4
4
  type MinItemWidth = CSSLength | number | SizesOptions | "fit-content" | "max-content" | "min-content" | "auto";
5
5
  export type GridBaseProps = {
6
+ /**
7
+ * @deprecated Use `gap` instead
8
+ */
6
9
  gutter?: SpacingOptions;
10
+ gap?: SpacingOptions;
7
11
  minItemWidth?: MinItemWidth;
8
12
  variant?: "grid" | "masonry";
9
13
  };
package/lib/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("open-props"),l=require("solid-js"),P=require("@bedrock-layout/register-resize-callback"),Z=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],K=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Z]),p=new Set(["innerHTML","textContent","innerText","children"]),ee=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),te=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function ne(e,t){const n=te[e];return typeof n=="object"?n[t]?n.$:void 0:n}const ie=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),se=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),oe={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function re(e,t,n){let i=n.length,s=t.length,r=i,c=0,o=0,a=t[s-1].nextSibling,f=null;for(;c<s||o<r;){if(t[c]===n[o]){c++,o++;continue}for(;t[s-1]===n[r-1];)s--,r--;if(s===c){const d=r<i?o?n[o-1].nextSibling:n[r-o]:a;for(;o<r;)e.insertBefore(n[o++],d)}else if(r===o)for(;c<s;)(!f||!f.has(t[c]))&&t[c].remove(),c++;else if(t[c]===n[r-1]&&n[o]===t[s-1]){const d=t[--s].nextSibling;e.insertBefore(n[o++],t[c++].nextSibling),e.insertBefore(n[--r],d),t[s]=n[r]}else{if(!f){f=new Map;let u=o;for(;u<r;)f.set(n[u],u++)}const d=f.get(t[c]);if(d!=null)if(o<d&&d<r){let u=c,h=1,C;for(;++u<s&&u<r&&!((C=f.get(t[u]))==null||C!==d+h);)h++;if(h>d-o){const I=t[c];for(;o<d;)e.insertBefore(n[o++],I)}else e.replaceChild(n[o++],t[c++])}else c++;else t[c++].remove()}}}const N="_$DX_DELEGATE";function D(e,t,n){let i;const s=()=>{const c=document.createElement("template");return c.innerHTML=e,n?c.content.firstChild.firstChild:c.content.firstChild},r=t?()=>l.untrack(()=>document.importNode(i||(i=s()),!0)):()=>(i||(i=s())).cloneNode(!0);return r.cloneNode=r,r}function ce(e,t=window.document){const n=t[N]||(t[N]=new Set);for(let i=0,s=e.length;i<s;i++){const r=e[i];n.has(r)||(n.add(r),t.addEventListener(r,be))}}function T(e,t,n){l.sharedConfig.context||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function le(e,t,n,i){l.sharedConfig.context||(i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i))}function ae(e,t){l.sharedConfig.context||(t==null?e.removeAttribute("class"):e.className=t)}function fe(e,t,n,i){if(i)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const s=n[0];e.addEventListener(t,n[0]=r=>s.call(e,n[1],r))}else e.addEventListener(t,n)}function de(e,t,n={}){const i=Object.keys(t||{}),s=Object.keys(n);let r,c;for(r=0,c=s.length;r<c;r++){const o=s[r];!o||o==="undefined"||t[o]||(L(e,o,!1),delete n[o])}for(r=0,c=i.length;r<c;r++){const o=i[r],a=!!t[o];!o||o==="undefined"||n[o]===a||!a||(L(e,o,!0),n[o]=a)}return n}function G(e,t,n){if(!t)return n?T(e,"style"):t;const i=e.style;if(typeof t=="string")return i.cssText=t;typeof n=="string"&&(i.cssText=n=void 0),n||(n={}),t||(t={});let s,r;for(r in n)t[r]==null&&i.removeProperty(r),delete n[r];for(r in t)s=t[r],s!==n[r]&&(i.setProperty(r,s),n[r]=s);return n}function ue(e,t={},n,i){const s={};return i||l.createRenderEffect(()=>s.children=x(e,t.children,s.children)),l.createRenderEffect(()=>t.ref&&t.ref(e)),l.createRenderEffect(()=>ye(e,t,n,!0,s,!0)),s}function ge(e,t,n){return l.untrack(()=>e(t,n))}function H(e,t,n,i){if(n!==void 0&&!i&&(i=[]),typeof t!="function")return x(e,t,i,n);l.createRenderEffect(s=>x(e,t(),s,n),i)}function ye(e,t,n,i,s={},r=!1){t||(t={});for(const c in s)if(!(c in t)){if(c==="children")continue;s[c]=R(e,c,null,s[c],n,r)}for(const c in t){if(c==="children"){i||x(e,t.children);continue}const o=t[c];s[c]=R(e,c,o,s[c],n,r)}}function me(e){let t,n;return!l.sharedConfig.context||!(t=l.sharedConfig.registry.get(n=$e()))?e():(l.sharedConfig.completed&&l.sharedConfig.completed.add(t),l.sharedConfig.registry.delete(n),t)}function he(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function L(e,t,n){const i=t.trim().split(/\s+/);for(let s=0,r=i.length;s<r;s++)e.classList.toggle(i[s],n)}function R(e,t,n,i,s,r){let c,o,a,f,d;if(t==="style")return G(e,n,i);if(t==="classList")return de(e,n,i);if(n===i)return i;if(t==="ref")r||n(e);else if(t.slice(0,3)==="on:"){const u=t.slice(3);i&&e.removeEventListener(u,i),n&&e.addEventListener(u,n)}else if(t.slice(0,10)==="oncapture:"){const u=t.slice(10);i&&e.removeEventListener(u,i,!0),n&&e.addEventListener(u,n,!0)}else if(t.slice(0,2)==="on"){const u=t.slice(2).toLowerCase(),h=ie.has(u);if(!h&&i){const C=Array.isArray(i)?i[0]:i;e.removeEventListener(u,C)}(h||n)&&(fe(e,u,n,h),h&&ce([u]))}else if(t.slice(0,5)==="attr:")T(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(a=p.has(t))||!s&&((f=ne(t,e.tagName))||(o=K.has(t)))||(c=e.nodeName.includes("-"))){if(d)t=t.slice(5),o=!0;else if(l.sharedConfig.context)return n;t==="class"||t==="className"?ae(e,n):c&&!o&&!a?e[he(t)]=n:e[f||t]=n}else{const u=s&&t.indexOf(":")>-1&&oe[t.split(":")[0]];u?le(e,u,t,n):T(e,ee[t]||t,n)}return n}function be(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}}),l.sharedConfig.registry&&!l.sharedConfig.done&&(l.sharedConfig.done=_$HY.done=!0);n;){const i=n[t];if(i&&!n.disabled){const s=n[`${t}Data`];if(s!==void 0?i.call(n,s,e):i.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function x(e,t,n,i,s){if(l.sharedConfig.context){!n&&(n=[...e.childNodes]);let o=[];for(let a=0;a<n.length;a++){const f=n[a];f.nodeType===8&&f.data.slice(0,2)==="!$"?f.remove():o.push(f)}n=o}for(;typeof n=="function";)n=n();if(t===n)return n;const r=typeof t,c=i!==void 0;if(e=c&&n[0]&&n[0].parentNode||e,r==="string"||r==="number"){if(l.sharedConfig.context)return n;if(r==="number"&&(t=t.toString()),c){let o=n[0];o&&o.nodeType===3?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=S(e,n,i,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||r==="boolean"){if(l.sharedConfig.context)return n;n=S(e,n,i)}else{if(r==="function")return l.createRenderEffect(()=>{let o=t();for(;typeof o=="function";)o=o();n=x(e,o,n,i)}),()=>n;if(Array.isArray(t)){const o=[],a=n&&Array.isArray(n);if(v(o,t,n,s))return l.createRenderEffect(()=>n=x(e,o,n,i,!0)),()=>n;if(l.sharedConfig.context){if(!o.length)return n;if(i===void 0)return[...e.childNodes];let f=o[0],d=[f];for(;(f=f.nextSibling)!==i;)d.push(f);return n=d}if(o.length===0){if(n=S(e,n,i),c)return n}else a?n.length===0?W(e,o,i):re(e,n,o):(n&&S(e),W(e,o));n=o}else if(t.nodeType){if(l.sharedConfig.context&&t.parentNode)return n=c?[t]:t;if(Array.isArray(n)){if(c)return n=S(e,n,i,t);S(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,i){let s=!1;for(let r=0,c=t.length;r<c;r++){let o=t[r],a=n&&n[e.length],f;if(!(o==null||o===!0||o===!1))if((f=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))s=v(e,o,a)||s;else if(f==="function")if(i){for(;typeof o=="function";)o=o();s=v(e,Array.isArray(o)?o:[o],Array.isArray(a)?a:[a])||s}else e.push(o),s=!0;else{const d=String(o);a&&a.nodeType===3&&a.data===d?e.push(a):e.push(document.createTextNode(d))}}return s}function W(e,t,n=null){for(let i=0,s=t.length;i<s;i++)e.insertBefore(t[i],n)}function S(e,t,n,i){if(n===void 0)return e.textContent="";const s=i||document.createTextNode("");if(t.length){let r=!1;for(let c=t.length-1;c>=0;c--){const o=t[c];if(s!==o){const a=o.parentNode===e;!r&&!c?a?e.replaceChild(s,o):e.insertBefore(s,n):a&&o.remove()}else r=!0}}else e.insertBefore(s,n);return[s]}function $e(){const e=l.sharedConfig.context;return`${e.id}${e.count++}`}const Ce="http://www.w3.org/2000/svg";function Se(e,t=!1){return t?document.createElementNS(Ce,e):document.createElement(e)}function xe(e){const[t,n]=l.splitProps(e,["component"]),i=l.createMemo(()=>t.component);return l.createMemo(()=>{const s=i();switch(typeof s){case"function":return l.untrack(()=>s(n));case"string":const r=se.has(s),c=l.sharedConfig.context?me():Se(s,r);return ue(c,n,r),c}})}function w(e){return e??void 0}function g(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,i)=>Object.defineProperty({...n},i,{get(){return e[i]},configurable:!0,enumerable:!0}),{})}function y(e,t){return l.createComponent(xe,l.mergeProps({get component(){return e()}},t))}function m(e){return Object.values(e).every(t=>typeof t=="function")?Object.keys(e).reduce((t,n)=>{const i=e[n];return Object.defineProperty(t,n,{get(){return i()},configurable:!0,enumerable:!0})},{}):new Error("Please provide an object with accessor values only.")}const _=/^--\D{1}.{0,100}$/;function F(e){return _.test(e)}function E(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}.{0,100}\)$/,_].some(t=>t.test(e))}const{sizeXxs:we,sizeXs:je,sizeSm:Ae,sizeMd:Pe,sizeLg:Ee,sizeXl:Ie,sizeXxl:Me,sizeContent1:Te,sizeContent2:ve,sizeContent3:Oe,sizeHeader1:ze,sizeHeader2:ke,sizeHeader3:Ne,size000:Le,size00:Re,size1:We,size2:Be,size3:De,size4:Ge,size5:He,size6:_e,size7:Fe,size8:Ve,size9:Xe,size10:qe,size11:Ue,size12:Qe,size13:Je,size14:Ye,size15:Ze}=Y,Ke={size000:Le,size00:Re,size1:We,size2:Be,size3:De,size4:Ge,size5:He,size6:_e,size7:Fe,size8:Ve,size9:Xe,size10:qe,size11:Ue,size12:Qe,size13:Je,size14:Ye,size15:Ze},pe={sizeXxs:we,sizeXs:je,sizeSm:Ae,sizeMd:Pe,sizeLg:Ee,sizeXl:Ie,sizeXxl:Me,sizeContent1:Te,sizeContent2:ve,sizeContent3:Oe,sizeHeader1:ze,sizeHeader2:ke,sizeHeader3:Ne},V=Ke,X=pe;function q(e){return e.reduce((t,[n,i])=>({...t,[n]:i}),{})}function O(e,t){if(t!==void 0)return typeof t=="number"&&t>=0?`${t}px`:typeof t=="string"&&E(t)?F(t)?`var(${t})`:t:w(b(e,t))}function b(e,t){const n=e.space??V,i=q(Object.entries(n).map(([s,r])=>[s,typeof r=="number"?`${r}px`:r]));return w(i[t])}function A(e,t){if(t===void 0)return;if(typeof t=="number"&&t>=0)return`${t}px`;if(typeof t=="string"&&E(t))return F(t)?`var(${t})`:t;const n=e.sizes??X,i=q(Object.entries(n).map(([s,r])=>[s,typeof r=="number"?`${r}px`:r]));return w(i[t])}function et(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}function tt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[a,f])=>o+`${a}:${f};`,""),n=()=>`--maxWidth: ${et(e.maxWidth)};`,i=()=>e.centerText?"center-text":"",s=()=>e.centerChildren?"center-children":"",r=()=>[i(),s()].filter(Boolean).join(" "),c=()=>[t(),n()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","maxWidth","centerText","centerChildren"]),m({style:c,"data-bedrock-center":r})))}const U=l.createContext({});function nt(e){return l.createComponent(U.Provider,{get value(){return e.theme},get children(){return e.children}})}function $(){try{return l.useContext(U)}catch{return{}}}function it(e,t){return A(e,t)}function st(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[a,f])=>o+`${a}:${f};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"}`,s=()=>`--minItemWidth: ${it(t,e.minItemWidth)}`,r=()=>e.noStretchedColumns===!0?"no-stretched-columns":"",c=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","minItemWidth","noStretchedColumns"]),m({style:c,"data-bedrock-column-drop":r})))}function ot(e,t){const[n,i]=l.createSignal(!1),[s,r]=l.createSignal();return l.onMount(()=>{P.init()}),l.createEffect(()=>{if(w(s())===void 0)return;t&&t(s());const c=P.registerCallback(s(),o=>{var f;const a=((f=o.borderBoxSize)==null?void 0:f.inlineSize)??o.contentRect.width;if(a>0){const d=a<=e;i(d)}});l.onCleanup(c)}),[n,r]}function rt(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 ct(e){return Array.isArray(e)?e.join("/"):e}function lt(e){return rt(e)?ct(e):void 0}function at(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,a])=>c+`${o}:${a};`,""),n=()=>lt(e.ratio),i=()=>n()?`--ratio: ${n()}`:"",s=()=>typeof e.position=="string"?`--position: ${e.position}`:"50%",r=()=>[t(),i(),s()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","ratio","position"]),m({style:r,"data-bedrock-frame":()=>""})))}function Q(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,a])=>c+`${o}:${a};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,s=()=>`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth??0}px`};`,r=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","minItemWidth"]),m({style:r,"data-bedrock-grid":()=>e.variant==="masonry"?"variant:masonry":""})))}const j=96;function J(e){const t=String(e),n=parseFloat(t),[,i]=t.match(/[\d.\-+]*\s*(.*)/)??["",""];return[n,i]}function k(e,t){if(!e)return;const n=t??document.body,i=(e??"px").trim().toLowerCase();switch(i){case"vmin":case"vmax":case"vh":case"vw":case"%":return;case"ch":case"ex":return ft(i,n);case"em":return z(n,"font-size");case"rem":return z(document.body,"font-size");case"in":return j;case"cm":return j/2.54;case"mm":return j/25.4;case"pt":return j/72;case"pc":return j/6;case"px":return 1;default:{const[s,r]=J(i);if(isNaN(s))return;if(!r)return s;const c=k(r,t);return typeof c=="number"?s*c:void 0}}}function z(e,t){const[n,i]=J(getComputedStyle(e).getPropertyValue(t));return n*(k(i,e)??1)}function ft(e,t){const n=document.createElement("div");n.style.height="128"+e,t.appendChild(n);const i=z(n,"height")/128;return t.removeChild(n),i}var dt=D("<div>");const M=1,ut=typeof window=="object"&&typeof document=="object"&&document.nodeType===9,gt=e=>{const[t,n]=l.createSignal(1),[i,s]=l.createSignal(),r=$();return l.onMount(()=>(P.init(),0)),l.createEffect(()=>{const c=w(i());if(c===void 0)return;const o=P.registerCallback(c,({target:a})=>{n(1);const f=e.gutter?b(r,e.gutter)??"1px":"1px",d=ut?k(f,a):void 0,u=Math.max(d??M,M),[h]=Array.from(a.children),C=1+Math.min(a.scrollHeight,h.scrollHeight),I=Math.max(Math.ceil(C/u),M);return n(I),0});return l.onCleanup(o),0}),(()=>{var c=dt();return ge(s,c),H(c,()=>e.children),l.createRenderEffect(o=>G(c,`grid-row: span ${t()};`,o)),c})()},yt=e=>{const t=l.children(()=>e.children),i=[].concat(t()).filter(Boolean).map(s=>l.createComponent(gt,{get gutter(){return e.gutter},children:s}));return l.createComponent(Q,l.mergeProps({style:"grid-template-rows: 1px;"},e,{children:i}))},mt={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},ht={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function bt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((a,[f,d])=>a+`${f}:${d};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,s=()=>e.justify!==void 0?mt[e.justify]:void 0,r=()=>e.align!==void 0?ht[e.align]:void 0,c=()=>[n(),i()].join("; "),o=()=>[s(),r()].filter(Boolean).join(" ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","justify","align"]),m({style:c,"data-bedrock-inline-cluster":o})))}const $t={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},Ct={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function St(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((u,[h,C])=>u+`${h}:${C};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,s=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,r=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",c=()=>e.justify!==void 0?$t[e.justify]:void 0,o=()=>e.align!==void 0?Ct[e.align]:void 0,a=()=>e.stretch?`stretch:${e.stretch}`:void 0,f=()=>[n(),i(),r(),s()].join("; "),d=()=>[c(),o(),a()].filter(Boolean).join(" ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","justify","align","stretch","switchAt"]),m({style:f,"data-bedrock-inline":d})))}const xt=e=>({left:"padding-inline-start",right:"padding-inline-end",top:"padding-block-start",bottom:"padding-block-end",inlineStart:"padding-inline-start",inlineEnd:"padding-inline-end",blockStart:"padding-block-start",blockEnd:"padding-block-end"})[e],wt=(e,t)=>{if(!t)return"";if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((i,[s,r])=>({...i,[xt(s)]:O(e,r)??"0px"}),{}):{padding:Array.from(Array.isArray(t)?t:[t]).map(i=>O(e,i)??"0px").join(" ")};return Object.entries(n).reduce((i,[s,r])=>i+`${s}:${r};`,"")};function jt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((r,[c,o])=>r+`${c}:${o};`,""),i=()=>wt(t,e.padding),s=()=>[n(),i()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","padding"]),m({style:s,"data-bedrock-padbox":()=>""})))}function At(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,a])=>c+`${o}:${a};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,s=()=>{switch(e.snapType){case"none":return"snapType:none";case"proximity":return"snapType:proximity";case"mandatory":return"snapType:mandatory";default:return"snapType:none"}},r=()=>[n(),i()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter"]),m({style:r,"data-bedrock-reel":s})))}const B={"1/4":"fraction:1/4","1/3":"fraction:1/3","1/2":"fraction:1/2","2/3":"fraction:2/3","3/4":"fraction:3/4","auto-start":"fraction:auto-start","auto-end":"fraction:auto-end"};function Pt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((a,[f,d])=>a+`${f}:${d};`,""),i=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",s=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,r=()=>B[e.fraction??"1/2"]??B["1/2"],c=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,o=()=>[n(),s(),i(),c()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","fraction"]),m({style:o,"data-bedrock-split":r})))}const Et={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function It(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[a,f])=>o+`${a}:${f};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,s=()=>[n(),i()].join("; "),r=()=>e.align!==void 0?Et[e.align]:void 0,c=()=>[r()].filter(Boolean).join(" ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter"]),m({style:s,"data-bedrock-stack":c})))}var Mt=D("<div data-bedrock-cover-centered>");function Tt(e){return typeof e=="number"?`${e}px`:e&&E(e)?e:"100vh"}function vt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[a,f])=>o+`${a}:${f};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,s=()=>`--minHeight: ${Tt(e.minHeight)};`,r=()=>e.stretchContent===!0?"stretch-content":"",c=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","minHeight","stretchContent"]),m({style:c,"data-bedrock-cover":r})))}function Ot(e){const[t,n]=l.splitProps(e,["children","top","bottom"]);return l.createComponent(vt,l.mergeProps(n,{get children(){return[l.createMemo(()=>t.top),(()=>{var i=Mt();return H(i,()=>t.children),i})(),l.createMemo(()=>t.bottom)]}}))}function zt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[a,f])=>o+`${a}:${f};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,s=()=>`--columns: ${w(Math.max(e.colCount??e.columns??1,1))??1};`,r=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",c=()=>[n(),i(),s(),r()].filter(Boolean).join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","columns","colCount","switchAt"]),m({style:c,"data-bedrock-columns":()=>""})))}const kt=e=>typeof e=="number"?e:1;function Nt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,a])=>c+`${o}:${a};`,""),n=()=>`--span: ${kt(e.span)};`,i=()=>e.offsetStart&&e.offsetStart>0?`--offsetStart: ${e.offsetStart};`:"",s=()=>e.offsetEnd&&e.offsetEnd>0?`--offsetEnd: ${e.offsetEnd};`:"",r=()=>[t(),n(),i(),s()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","span","offsetStart","offsetEnd"]),m({style:r,"data-bedrock-column":()=>""})))}exports.Center=tt;exports.Column=Nt;exports.ColumnDrop=st;exports.Columns=zt;exports.Cover=Ot;exports.Frame=at;exports.Grid=Q;exports.Inline=St;exports.InlineCluster=bt;exports.MasonryGrid=yt;exports.PadBox=jt;exports.Reel=At;exports.Split=Pt;exports.Stack=It;exports.ThemeProvider=nt;exports.checkIsCSSLength=E;exports.createContainerQuery=ot;exports.getSafeGutter=O;exports.getSizeValue=A;exports.getSpacingValue=b;exports.sizes=X;exports.spacing=V;exports.useTheme=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("open-props"),a=require("solid-js"),P=require("@bedrock-layout/register-resize-callback"),Z=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],K=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Z]),p=new Set(["innerHTML","textContent","innerText","children"]),ee=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),te=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function ne(e,t){const n=te[e];return typeof n=="object"?n[t]?n.$:void 0:n}const ie=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),se=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),oe={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function re(e,t,n){let i=n.length,s=t.length,r=i,c=0,o=0,l=t[s-1].nextSibling,f=null;for(;c<s||o<r;){if(t[c]===n[o]){c++,o++;continue}for(;t[s-1]===n[r-1];)s--,r--;if(s===c){const d=r<i?o?n[o-1].nextSibling:n[r-o]:l;for(;o<r;)e.insertBefore(n[o++],d)}else if(r===o)for(;c<s;)(!f||!f.has(t[c]))&&t[c].remove(),c++;else if(t[c]===n[r-1]&&n[o]===t[s-1]){const d=t[--s].nextSibling;e.insertBefore(n[o++],t[c++].nextSibling),e.insertBefore(n[--r],d),t[s]=n[r]}else{if(!f){f=new Map;let u=o;for(;u<r;)f.set(n[u],u++)}const d=f.get(t[c]);if(d!=null)if(o<d&&d<r){let u=c,h=1,C;for(;++u<s&&u<r&&!((C=f.get(t[u]))==null||C!==d+h);)h++;if(h>d-o){const I=t[c];for(;o<d;)e.insertBefore(n[o++],I)}else e.replaceChild(n[o++],t[c++])}else c++;else t[c++].remove()}}}const N="_$DX_DELEGATE";function D(e,t,n){let i;const s=()=>{const c=document.createElement("template");return c.innerHTML=e,n?c.content.firstChild.firstChild:c.content.firstChild},r=t?()=>a.untrack(()=>document.importNode(i||(i=s()),!0)):()=>(i||(i=s())).cloneNode(!0);return r.cloneNode=r,r}function ce(e,t=window.document){const n=t[N]||(t[N]=new Set);for(let i=0,s=e.length;i<s;i++){const r=e[i];n.has(r)||(n.add(r),t.addEventListener(r,be))}}function T(e,t,n){a.sharedConfig.context||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function ae(e,t,n,i){a.sharedConfig.context||(i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i))}function le(e,t){a.sharedConfig.context||(t==null?e.removeAttribute("class"):e.className=t)}function fe(e,t,n,i){if(i)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const s=n[0];e.addEventListener(t,n[0]=r=>s.call(e,n[1],r))}else e.addEventListener(t,n)}function de(e,t,n={}){const i=Object.keys(t||{}),s=Object.keys(n);let r,c;for(r=0,c=s.length;r<c;r++){const o=s[r];!o||o==="undefined"||t[o]||(L(e,o,!1),delete n[o])}for(r=0,c=i.length;r<c;r++){const o=i[r],l=!!t[o];!o||o==="undefined"||n[o]===l||!l||(L(e,o,!0),n[o]=l)}return n}function G(e,t,n){if(!t)return n?T(e,"style"):t;const i=e.style;if(typeof t=="string")return i.cssText=t;typeof n=="string"&&(i.cssText=n=void 0),n||(n={}),t||(t={});let s,r;for(r in n)t[r]==null&&i.removeProperty(r),delete n[r];for(r in t)s=t[r],s!==n[r]&&(i.setProperty(r,s),n[r]=s);return n}function ue(e,t={},n,i){const s={};return i||a.createRenderEffect(()=>s.children=x(e,t.children,s.children)),a.createRenderEffect(()=>t.ref&&t.ref(e)),a.createRenderEffect(()=>ye(e,t,n,!0,s,!0)),s}function ge(e,t,n){return a.untrack(()=>e(t,n))}function H(e,t,n,i){if(n!==void 0&&!i&&(i=[]),typeof t!="function")return x(e,t,i,n);a.createRenderEffect(s=>x(e,t(),s,n),i)}function ye(e,t,n,i,s={},r=!1){t||(t={});for(const c in s)if(!(c in t)){if(c==="children")continue;s[c]=R(e,c,null,s[c],n,r)}for(const c in t){if(c==="children"){i||x(e,t.children);continue}const o=t[c];s[c]=R(e,c,o,s[c],n,r)}}function me(e){let t,n;return!a.sharedConfig.context||!(t=a.sharedConfig.registry.get(n=$e()))?e():(a.sharedConfig.completed&&a.sharedConfig.completed.add(t),a.sharedConfig.registry.delete(n),t)}function he(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function L(e,t,n){const i=t.trim().split(/\s+/);for(let s=0,r=i.length;s<r;s++)e.classList.toggle(i[s],n)}function R(e,t,n,i,s,r){let c,o,l,f,d;if(t==="style")return G(e,n,i);if(t==="classList")return de(e,n,i);if(n===i)return i;if(t==="ref")r||n(e);else if(t.slice(0,3)==="on:"){const u=t.slice(3);i&&e.removeEventListener(u,i),n&&e.addEventListener(u,n)}else if(t.slice(0,10)==="oncapture:"){const u=t.slice(10);i&&e.removeEventListener(u,i,!0),n&&e.addEventListener(u,n,!0)}else if(t.slice(0,2)==="on"){const u=t.slice(2).toLowerCase(),h=ie.has(u);if(!h&&i){const C=Array.isArray(i)?i[0]:i;e.removeEventListener(u,C)}(h||n)&&(fe(e,u,n,h),h&&ce([u]))}else if(t.slice(0,5)==="attr:")T(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(l=p.has(t))||!s&&((f=ne(t,e.tagName))||(o=K.has(t)))||(c=e.nodeName.includes("-"))){if(d)t=t.slice(5),o=!0;else if(a.sharedConfig.context)return n;t==="class"||t==="className"?le(e,n):c&&!o&&!l?e[he(t)]=n:e[f||t]=n}else{const u=s&&t.indexOf(":")>-1&&oe[t.split(":")[0]];u?ae(e,u,t,n):T(e,ee[t]||t,n)}return n}function be(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}}),a.sharedConfig.registry&&!a.sharedConfig.done&&(a.sharedConfig.done=_$HY.done=!0);n;){const i=n[t];if(i&&!n.disabled){const s=n[`${t}Data`];if(s!==void 0?i.call(n,s,e):i.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function x(e,t,n,i,s){if(a.sharedConfig.context){!n&&(n=[...e.childNodes]);let o=[];for(let l=0;l<n.length;l++){const f=n[l];f.nodeType===8&&f.data.slice(0,2)==="!$"?f.remove():o.push(f)}n=o}for(;typeof n=="function";)n=n();if(t===n)return n;const r=typeof t,c=i!==void 0;if(e=c&&n[0]&&n[0].parentNode||e,r==="string"||r==="number"){if(a.sharedConfig.context)return n;if(r==="number"&&(t=t.toString()),c){let o=n[0];o&&o.nodeType===3?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=S(e,n,i,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||r==="boolean"){if(a.sharedConfig.context)return n;n=S(e,n,i)}else{if(r==="function")return a.createRenderEffect(()=>{let o=t();for(;typeof o=="function";)o=o();n=x(e,o,n,i)}),()=>n;if(Array.isArray(t)){const o=[],l=n&&Array.isArray(n);if(v(o,t,n,s))return a.createRenderEffect(()=>n=x(e,o,n,i,!0)),()=>n;if(a.sharedConfig.context){if(!o.length)return n;if(i===void 0)return[...e.childNodes];let f=o[0],d=[f];for(;(f=f.nextSibling)!==i;)d.push(f);return n=d}if(o.length===0){if(n=S(e,n,i),c)return n}else l?n.length===0?W(e,o,i):re(e,n,o):(n&&S(e),W(e,o));n=o}else if(t.nodeType){if(a.sharedConfig.context&&t.parentNode)return n=c?[t]:t;if(Array.isArray(n)){if(c)return n=S(e,n,i,t);S(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,i){let s=!1;for(let r=0,c=t.length;r<c;r++){let o=t[r],l=n&&n[e.length],f;if(!(o==null||o===!0||o===!1))if((f=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))s=v(e,o,l)||s;else if(f==="function")if(i){for(;typeof o=="function";)o=o();s=v(e,Array.isArray(o)?o:[o],Array.isArray(l)?l:[l])||s}else e.push(o),s=!0;else{const d=String(o);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d))}}return s}function W(e,t,n=null){for(let i=0,s=t.length;i<s;i++)e.insertBefore(t[i],n)}function S(e,t,n,i){if(n===void 0)return e.textContent="";const s=i||document.createTextNode("");if(t.length){let r=!1;for(let c=t.length-1;c>=0;c--){const o=t[c];if(s!==o){const l=o.parentNode===e;!r&&!c?l?e.replaceChild(s,o):e.insertBefore(s,n):l&&o.remove()}else r=!0}}else e.insertBefore(s,n);return[s]}function $e(){const e=a.sharedConfig.context;return`${e.id}${e.count++}`}const Ce="http://www.w3.org/2000/svg";function Se(e,t=!1){return t?document.createElementNS(Ce,e):document.createElement(e)}function xe(e){const[t,n]=a.splitProps(e,["component"]),i=a.createMemo(()=>t.component);return a.createMemo(()=>{const s=i();switch(typeof s){case"function":return a.untrack(()=>s(n));case"string":const r=se.has(s),c=a.sharedConfig.context?me():Se(s,r);return ue(c,n,r),c}})}function w(e){return e??void 0}function g(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,i)=>Object.defineProperty({...n},i,{get(){return e[i]},configurable:!0,enumerable:!0}),{})}function y(e,t){return a.createComponent(xe,a.mergeProps({get component(){return e()}},t))}function m(e){return Object.values(e).every(t=>typeof t=="function")?Object.keys(e).reduce((t,n)=>{const i=e[n];return Object.defineProperty(t,n,{get(){return i()},configurable:!0,enumerable:!0})},{}):new Error("Please provide an object with accessor values only.")}const _=/^--\D{1}.{0,100}$/;function F(e){return _.test(e)}function E(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}.{0,100}\)$/,_].some(t=>t.test(e))}const{sizeXxs:we,sizeXs:je,sizeSm:Ae,sizeMd:Pe,sizeLg:Ee,sizeXl:Ie,sizeXxl:Me,sizeContent1:Te,sizeContent2:ve,sizeContent3:Oe,sizeHeader1:ze,sizeHeader2:ke,sizeHeader3:Ne,size000:Le,size00:Re,size1:We,size2:Be,size3:De,size4:Ge,size5:He,size6:_e,size7:Fe,size8:Ve,size9:Xe,size10:qe,size11:Ue,size12:Qe,size13:Je,size14:Ye,size15:Ze}=Y,Ke={size000:Le,size00:Re,size1:We,size2:Be,size3:De,size4:Ge,size5:He,size6:_e,size7:Fe,size8:Ve,size9:Xe,size10:qe,size11:Ue,size12:Qe,size13:Je,size14:Ye,size15:Ze},pe={sizeXxs:we,sizeXs:je,sizeSm:Ae,sizeMd:Pe,sizeLg:Ee,sizeXl:Ie,sizeXxl:Me,sizeContent1:Te,sizeContent2:ve,sizeContent3:Oe,sizeHeader1:ze,sizeHeader2:ke,sizeHeader3:Ne},V=Ke,X=pe;function q(e){return e.reduce((t,[n,i])=>({...t,[n]:i}),{})}function O(e,t){if(t!==void 0)return typeof t=="number"&&t>=0?`${t}px`:typeof t=="string"&&E(t)?F(t)?`var(${t})`:t:w(b(e,t))}function b(e,t){const n=e.space??V,i=q(Object.entries(n).map(([s,r])=>[s,typeof r=="number"?`${r}px`:r]));return w(i[t])}function A(e,t){if(t===void 0)return;if(typeof t=="number"&&t>=0)return`${t}px`;if(typeof t=="string"&&E(t))return F(t)?`var(${t})`:t;const n=e.sizes??X,i=q(Object.entries(n).map(([s,r])=>[s,typeof r=="number"?`${r}px`:r]));return w(i[t])}function et(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}function tt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),n=()=>`--maxWidth: ${et(e.maxWidth)};`,i=()=>e.centerText?"center-text":"",s=()=>e.centerChildren?"center-children":"",r=()=>[i(),s()].filter(Boolean).join(" "),c=()=>[t(),n()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","maxWidth","centerText","centerChildren"]),m({style:c,"data-bedrock-center":r})))}const U=a.createContext({});function nt(e){return a.createComponent(U.Provider,{get value(){return e.theme},get children(){return e.children}})}function $(){try{return a.useContext(U)}catch{return{}}}function it(e,t){return A(e,t)}function st(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--minItemWidth: ${it(t,e.minItemWidth)}`,r=()=>e.noStretchedColumns===!0?"no-stretched-columns":"",c=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","minItemWidth","noStretchedColumns"]),m({style:c,"data-bedrock-column-drop":r})))}function ot(e,t){const[n,i]=a.createSignal(!1),[s,r]=a.createSignal();return a.onMount(()=>{P.init()}),a.createEffect(()=>{if(w(s())===void 0)return;t&&t(s());const c=P.registerCallback(s(),o=>{var f;const l=((f=o.borderBoxSize)==null?void 0:f.inlineSize)??o.contentRect.width;if(l>0){const d=l<=e;i(d)}});a.onCleanup(c)}),[n,r]}function rt(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 ct(e){return Array.isArray(e)?e.join("/"):e}function at(e){return rt(e)?ct(e):void 0}function lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,l])=>c+`${o}:${l};`,""),n=()=>at(e.ratio),i=()=>n()?`--ratio: ${n()}`:"",s=()=>typeof e.position=="string"?`--position: ${e.position}`:"50%",r=()=>[t(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","ratio","position"]),m({style:r,"data-bedrock-frame":()=>""})))}function Q(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,l])=>c+`${o}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth??0}px`};`,r=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","minItemWidth"]),m({style:r,"data-bedrock-grid":()=>e.variant==="masonry"?"variant:masonry":""})))}const j=96;function J(e){const t=String(e),n=parseFloat(t),[,i]=t.match(/[\d.\-+]*\s*(.*)/)??["",""];return[n,i]}function k(e,t){if(!e)return;const n=t??document.body,i=(e??"px").trim().toLowerCase();switch(i){case"vmin":case"vmax":case"vh":case"vw":case"%":return;case"ch":case"ex":return ft(i,n);case"em":return z(n,"font-size");case"rem":return z(document.body,"font-size");case"in":return j;case"cm":return j/2.54;case"mm":return j/25.4;case"pt":return j/72;case"pc":return j/6;case"px":return 1;default:{const[s,r]=J(i);if(isNaN(s))return;if(!r)return s;const c=k(r,t);return typeof c=="number"?s*c:void 0}}}function z(e,t){const[n,i]=J(getComputedStyle(e).getPropertyValue(t));return n*(k(i,e)??1)}function ft(e,t){const n=document.createElement("div");n.style.height="128"+e,t.appendChild(n);const i=z(n,"height")/128;return t.removeChild(n),i}var dt=D("<div>");const M=1,ut=typeof window=="object"&&typeof document=="object"&&document.nodeType===9,gt=e=>{const[t,n]=a.createSignal(1),[i,s]=a.createSignal(),r=$();return a.onMount(()=>(P.init(),0)),a.createEffect(()=>{const c=w(i());if(c===void 0)return;const o=P.registerCallback(c,({target:l})=>{n(1);const f=e.gutter?b(r,e.gutter)??"1px":"1px",d=ut?k(f,l):void 0,u=Math.max(d??M,M),[h]=Array.from(l.children),C=1+Math.min(l.scrollHeight,h.scrollHeight),I=Math.max(Math.ceil(C/u),M);return n(I),0});return a.onCleanup(o),0}),(()=>{var c=dt();return ge(s,c),H(c,()=>e.children),a.createRenderEffect(o=>G(c,`grid-row: span ${t()};`,o)),c})()},yt=e=>{const t=a.children(()=>e.children),i=[].concat(t()).filter(Boolean).map(s=>a.createComponent(gt,{get gutter(){return e.gutter},children:s}));return a.createComponent(Q,a.mergeProps({style:"grid-template-rows: 1px;"},e,{children:i}))},mt={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},ht={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function bt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((l,[f,d])=>l+`${f}:${d};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>e.justify!==void 0?mt[e.justify]:void 0,r=()=>e.align!==void 0?ht[e.align]:void 0,c=()=>[n(),i()].join("; "),o=()=>[s(),r()].filter(Boolean).join(" ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","justify","align"]),m({style:c,"data-bedrock-inline-cluster":o})))}const $t={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},Ct={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function St(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((u,[h,C])=>u+`${h}:${C};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,r=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",c=()=>e.justify!==void 0?$t[e.justify]:void 0,o=()=>e.align!==void 0?Ct[e.align]:void 0,l=()=>e.stretch?`stretch:${e.stretch}`:void 0,f=()=>[n(),i(),r(),s()].join("; "),d=()=>[c(),o(),l()].filter(Boolean).join(" ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","justify","align","stretch","switchAt"]),m({style:f,"data-bedrock-inline":d})))}const xt=e=>({left:"padding-inline-start",right:"padding-inline-end",top:"padding-block-start",bottom:"padding-block-end",inlineStart:"padding-inline-start",inlineEnd:"padding-inline-end",blockStart:"padding-block-start",blockEnd:"padding-block-end"})[e],wt=(e,t)=>{if(!t)return"";if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((i,[s,r])=>({...i,[xt(s)]:O(e,r)??"0px"}),{}):{padding:Array.from(Array.isArray(t)?t:[t]).map(i=>O(e,i)??"0px").join(" ")};return Object.entries(n).reduce((i,[s,r])=>i+`${s}:${r};`,"")};function jt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((r,[c,o])=>r+`${c}:${o};`,""),i=()=>wt(t,e.padding),s=()=>[n(),i()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","padding"]),m({style:s,"data-bedrock-padbox":()=>""})))}function At(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,l])=>c+`${o}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>{switch(e.snapType){case"none":return"snapType:none";case"proximity":return"snapType:proximity";case"mandatory":return"snapType:mandatory";default:return"snapType:none"}},r=()=>[n(),i()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter"]),m({style:r,"data-bedrock-reel":s})))}const B={"1/4":"fraction:1/4","1/3":"fraction:1/3","1/2":"fraction:1/2","2/3":"fraction:2/3","3/4":"fraction:3/4","auto-start":"fraction:auto-start","auto-end":"fraction:auto-end"};function Pt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((l,[f,d])=>l+`${f}:${d};`,""),i=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",s=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>B[e.fraction??"1/2"]??B["1/2"],c=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,o=()=>[n(),s(),i(),c()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","fraction"]),m({style:o,"data-bedrock-split":r})))}const Et={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function It(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>[n(),i()].join("; "),r=()=>e.align!==void 0?Et[e.align]:void 0,c=()=>[r()].filter(Boolean).join(" ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter"]),m({style:s,"data-bedrock-stack":c})))}var Mt=D("<div data-bedrock-cover-centered>");function Tt(e){return typeof e=="number"?`${e}px`:e&&E(e)?e:"100vh"}function vt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--minHeight: ${Tt(e.minHeight)};`,r=()=>e.stretchContent===!0?"stretch-content":"",c=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","minHeight","stretchContent"]),m({style:c,"data-bedrock-cover":r})))}function Ot(e){const[t,n]=a.splitProps(e,["children","top","bottom"]);return a.createComponent(vt,a.mergeProps(n,{get children(){return[a.createMemo(()=>t.top),(()=>{var i=Mt();return H(i,()=>t.children),i})(),a.createMemo(()=>t.bottom)]}}))}function zt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--columns: ${w(Math.max(e.colCount??e.columns??1,1))??1};`,r=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",c=()=>[n(),i(),s(),r()].filter(Boolean).join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","columns","colCount","switchAt"]),m({style:c,"data-bedrock-columns":()=>""})))}const kt=e=>typeof e=="number"?e:1;function Nt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,l])=>c+`${o}:${l};`,""),n=()=>`--span: ${kt(e.span)};`,i=()=>e.offsetStart&&e.offsetStart>0?`--offsetStart: ${e.offsetStart};`:"",s=()=>e.offsetEnd&&e.offsetEnd>0?`--offsetEnd: ${e.offsetEnd};`:"",r=()=>[t(),n(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","span","offsetStart","offsetEnd"]),m({style:r,"data-bedrock-column":()=>""})))}exports.Center=tt;exports.Column=Nt;exports.ColumnDrop=st;exports.Columns=zt;exports.Cover=Ot;exports.Frame=lt;exports.Grid=Q;exports.Inline=St;exports.InlineCluster=bt;exports.MasonryGrid=yt;exports.PadBox=jt;exports.Reel=At;exports.Split=Pt;exports.Stack=It;exports.ThemeProvider=nt;exports.checkIsCSSLength=E;exports.createContainerQuery=ot;exports.getSafeGutter=O;exports.getSizeValue=A;exports.getSpacingValue=b;exports.sizes=X;exports.spacing=V;exports.useTheme=$;
package/lib/index.m.js CHANGED
@@ -683,7 +683,7 @@ function me(t, e) {
683
683
  return O(t, e);
684
684
  }
685
685
  function De(t) {
686
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l, a]) => o + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${me(e, t.minItemWidth)}`, c = () => t.noStretchedColumns === !0 ? "no-stretched-columns" : "", r = () => [n(), i(), s()].join("; ");
686
+ const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l, a]) => o + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${me(e, t.minItemWidth)}`, c = () => t.noStretchedColumns === !0 ? "no-stretched-columns" : "", r = () => [n(), i(), s()].join("; ");
687
687
  return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "minItemWidth", "noStretchedColumns"]), g({
688
688
  style: r,
689
689
  "data-bedrock-column-drop": c
@@ -725,7 +725,7 @@ function He(t) {
725
725
  })));
726
726
  }
727
727
  function $e(t) {
728
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [o, l]) => r + `${o}:${l};`, ""), i = () => `--gutter: ${$(e, t.gutter ?? "size00") ?? "0px"};`, s = () => `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth ?? 0}px`};`, c = () => [n(), i(), s()].join("; ");
728
+ const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [o, l]) => r + `${o}:${l};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth ?? 0}px`};`, c = () => [n(), i(), s()].join("; ");
729
729
  return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "minItemWidth"]), g({
730
730
  style: c,
731
731
  "data-bedrock-grid": () => t.variant === "masonry" ? "variant:masonry" : ""
@@ -833,7 +833,7 @@ const M = 1, we = typeof window == "object" && typeof document == "object" && do
833
833
  stretch: "align:stretch"
834
834
  };
835
835
  function Fe(t) {
836
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => `--gutter: ${$(e, t.gutter ?? "size00") ?? "0px"};`, s = () => t.justify !== void 0 ? Ae[t.justify] : void 0, c = () => t.align !== void 0 ? Ce[t.align] : void 0, r = () => [n(), i()].join("; "), o = () => [s(), c()].filter(Boolean).join(" ");
836
+ const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.justify !== void 0 ? Ae[t.justify] : void 0, c = () => t.align !== void 0 ? Ce[t.align] : void 0, r = () => [n(), i()].join("; "), o = () => [s(), c()].filter(Boolean).join(" ");
837
837
  return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "justify", "align"]), g({
838
838
  style: r,
839
839
  "data-bedrock-inline-cluster": o
@@ -852,7 +852,7 @@ const Ee = {
852
852
  stretch: "align:stretch"
853
853
  };
854
854
  function Ve(t) {
855
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((u, [b, S]) => u + `${b}:${S};`, ""), i = () => `--gutter: ${$(e, t.gutter ?? "size00") ?? "0px"};`, s = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, c = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", r = () => t.justify !== void 0 ? Ee[t.justify] : void 0, o = () => t.align !== void 0 ? Ie[t.align] : void 0, l = () => t.stretch ? `stretch:${t.stretch}` : void 0, a = () => [n(), i(), c(), s()].join("; "), f = () => [r(), o(), l()].filter(Boolean).join(" ");
855
+ const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((u, [b, S]) => u + `${b}:${S};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, c = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", r = () => t.justify !== void 0 ? Ee[t.justify] : void 0, o = () => t.align !== void 0 ? Ie[t.align] : void 0, l = () => t.stretch ? `stretch:${t.stretch}` : void 0, a = () => [n(), i(), c(), s()].join("; "), f = () => [r(), o(), l()].filter(Boolean).join(" ");
856
856
  return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "justify", "align", "stretch", "switchAt"]), g({
857
857
  style: a,
858
858
  "data-bedrock-inline": f
@@ -888,7 +888,7 @@ function Xe(t) {
888
888
  })));
889
889
  }
890
890
  function Ue(t) {
891
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [o, l]) => r + `${o}:${l};`, ""), i = () => `--gutter: ${$(e, t.gutter ?? "size00") ?? "0px"};`, s = () => {
891
+ const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [o, l]) => r + `${o}:${l};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => {
892
892
  switch (t.snapType) {
893
893
  case "none":
894
894
  return "snapType:none";
@@ -915,7 +915,7 @@ const F = {
915
915
  "auto-end": "fraction:auto-end"
916
916
  };
917
917
  function qe(t) {
918
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", s = () => `--gutter: ${$(e, t.gutter ?? "size00") ?? "0px"};`, c = () => F[t.fraction ?? "1/2"] ?? F["1/2"], r = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, o = () => [n(), s(), i(), r()].join("; ");
918
+ const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", s = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, c = () => F[t.fraction ?? "1/2"] ?? F["1/2"], r = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, o = () => [n(), s(), i(), r()].join("; ");
919
919
  return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "fraction"]), g({
920
920
  style: o,
921
921
  "data-bedrock-split": c
@@ -928,7 +928,7 @@ const Oe = {
928
928
  stretch: "align:stretch"
929
929
  };
930
930
  function Qe(t) {
931
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l, a]) => o + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gutter ?? "size00") ?? "0px"};`, s = () => [n(), i()].join("; "), c = () => t.align !== void 0 ? Oe[t.align] : void 0, r = () => [c()].filter(Boolean).join(" ");
931
+ const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l, a]) => o + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => [n(), i()].join("; "), c = () => t.align !== void 0 ? Oe[t.align] : void 0, r = () => [c()].filter(Boolean).join(" ");
932
932
  return h(() => t.as ?? "div", y(m(t, ["as", "gutter"]), g({
933
933
  style: s,
934
934
  "data-bedrock-stack": r
@@ -939,7 +939,7 @@ function Me(t) {
939
939
  return typeof t == "number" ? `${t}px` : t && W(t) ? t : "100vh";
940
940
  }
941
941
  function ze(t) {
942
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l, a]) => o + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gutter ?? "size00") ?? "0px"};`, s = () => `--minHeight: ${Me(t.minHeight)};`, c = () => t.stretchContent === !0 ? "stretch-content" : "", r = () => [n(), i(), s()].join("; ");
942
+ const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l, a]) => o + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minHeight: ${Me(t.minHeight)};`, c = () => t.stretchContent === !0 ? "stretch-content" : "", r = () => [n(), i(), s()].join("; ");
943
943
  return h(() => t.as ?? "div", y(m(t, ["as", "minHeight", "stretchContent"]), g({
944
944
  style: r,
945
945
  "data-bedrock-cover": c
@@ -957,7 +957,7 @@ function Ye(t) {
957
957
  }));
958
958
  }
959
959
  function Je(t) {
960
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l, a]) => o + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gutter ?? "size00") ?? "0px"};`, s = () => `--columns: ${C(Math.max(t.colCount ?? t.columns ?? 1, 1)) ?? 1};`, c = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", r = () => [n(), i(), s(), c()].filter(Boolean).join("; ");
960
+ const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l, a]) => o + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--columns: ${C(Math.max(t.colCount ?? t.columns ?? 1, 1)) ?? 1};`, c = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", r = () => [n(), i(), s(), c()].filter(Boolean).join("; ");
961
961
  return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "columns", "colCount", "switchAt"]), g({
962
962
  style: r,
963
963
  "data-bedrock-columns": () => ""
package/lib/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(u,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("open-props"),require("solid-js"),require("@bedrock-layout/register-resize-callback")):typeof define=="function"&&define.amd?define(["exports","open-props","solid-js","@bedrock-layout/register-resize-callback"],A):(u=typeof globalThis<"u"?globalThis:u||self,A(u.solid={},u.OpenProps,u.solidJs,u.registerResizeCallback))})(this,function(u,A,a,T){"use strict";const p=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],J=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...p]),ee=new Set(["innerHTML","textContent","innerText","children"]),te=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),ne=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function ie(e,t){const n=ne[e];return typeof n=="object"?n[t]?n.$:void 0:n}const re=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),ce=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),oe={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function se(e,t,n){let i=n.length,r=t.length,o=i,s=0,c=0,f=t[r-1].nextSibling,l=null;for(;s<r||c<o;){if(t[s]===n[c]){s++,c++;continue}for(;t[r-1]===n[o-1];)r--,o--;if(r===s){const d=o<i?c?n[c-1].nextSibling:n[o-c]:f;for(;c<o;)e.insertBefore(n[c++],d)}else if(o===c)for(;s<r;)(!l||!l.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[o-1]&&n[c]===t[r-1]){const d=t[--r].nextSibling;e.insertBefore(n[c++],t[s++].nextSibling),e.insertBefore(n[--o],d),t[r]=n[o]}else{if(!l){l=new Map;let y=c;for(;y<o;)l.set(n[y],y++)}const d=l.get(t[s]);if(d!=null)if(c<d&&d<o){let y=s,C=1,S;for(;++y<r&&y<o&&!((S=l.get(t[y]))==null||S!==d+C);)C++;if(C>d-c){const L=t[s];for(;c<d;)e.insertBefore(n[c++],L)}else e.replaceChild(n[c++],t[s++])}else s++;else t[s++].remove()}}}const W="_$DX_DELEGATE";function B(e,t,n){let i;const r=()=>{const s=document.createElement("template");return s.innerHTML=e,n?s.content.firstChild.firstChild:s.content.firstChild},o=t?()=>a.untrack(()=>document.importNode(i||(i=r()),!0)):()=>(i||(i=r())).cloneNode(!0);return o.cloneNode=o,o}function ae(e,t=window.document){const n=t[W]||(t[W]=new Set);for(let i=0,r=e.length;i<r;i++){const o=e[i];n.has(o)||(n.add(o),t.addEventListener(o,$e))}}function M(e,t,n){a.sharedConfig.context||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function fe(e,t,n,i){a.sharedConfig.context||(i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i))}function le(e,t){a.sharedConfig.context||(t==null?e.removeAttribute("class"):e.className=t)}function ue(e,t,n,i){if(i)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=o=>r.call(e,n[1],o))}else e.addEventListener(t,n)}function de(e,t,n={}){const i=Object.keys(t||{}),r=Object.keys(n);let o,s;for(o=0,s=r.length;o<s;o++){const c=r[o];!c||c==="undefined"||t[c]||(G(e,c,!1),delete n[c])}for(o=0,s=i.length;o<s;o++){const c=i[o],f=!!t[c];!c||c==="undefined"||n[c]===f||!f||(G(e,c,!0),n[c]=f)}return n}function R(e,t,n){if(!t)return n?M(e,"style"):t;const i=e.style;if(typeof t=="string")return i.cssText=t;typeof n=="string"&&(i.cssText=n=void 0),n||(n={}),t||(t={});let r,o;for(o in n)t[o]==null&&i.removeProperty(o),delete n[o];for(o in t)r=t[o],r!==n[o]&&(i.setProperty(o,r),n[o]=r);return n}function ye(e,t={},n,i){const r={};return i||a.createRenderEffect(()=>r.children=j(e,t.children,r.children)),a.createRenderEffect(()=>t.ref&&t.ref(e)),a.createRenderEffect(()=>me(e,t,n,!0,r,!0)),r}function ge(e,t,n){return a.untrack(()=>e(t,n))}function D(e,t,n,i){if(n!==void 0&&!i&&(i=[]),typeof t!="function")return j(e,t,i,n);a.createRenderEffect(r=>j(e,t(),r,n),i)}function me(e,t,n,i,r={},o=!1){t||(t={});for(const s in r)if(!(s in t)){if(s==="children")continue;r[s]=H(e,s,null,r[s],n,o)}for(const s in t){if(s==="children"){i||j(e,t.children);continue}const c=t[s];r[s]=H(e,s,c,r[s],n,o)}}function he(e){let t,n;return!a.sharedConfig.context||!(t=a.sharedConfig.registry.get(n=Ce()))?e():(a.sharedConfig.completed&&a.sharedConfig.completed.add(t),a.sharedConfig.registry.delete(n),t)}function be(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function G(e,t,n){const i=t.trim().split(/\s+/);for(let r=0,o=i.length;r<o;r++)e.classList.toggle(i[r],n)}function H(e,t,n,i,r,o){let s,c,f,l,d;if(t==="style")return R(e,n,i);if(t==="classList")return de(e,n,i);if(n===i)return i;if(t==="ref")o||n(e);else if(t.slice(0,3)==="on:"){const y=t.slice(3);i&&e.removeEventListener(y,i),n&&e.addEventListener(y,n)}else if(t.slice(0,10)==="oncapture:"){const y=t.slice(10);i&&e.removeEventListener(y,i,!0),n&&e.addEventListener(y,n,!0)}else if(t.slice(0,2)==="on"){const y=t.slice(2).toLowerCase(),C=re.has(y);if(!C&&i){const S=Array.isArray(i)?i[0]:i;e.removeEventListener(y,S)}(C||n)&&(ue(e,y,n,C),C&&ae([y]))}else if(t.slice(0,5)==="attr:")M(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(f=ee.has(t))||!r&&((l=ie(t,e.tagName))||(c=J.has(t)))||(s=e.nodeName.includes("-"))){if(d)t=t.slice(5),c=!0;else if(a.sharedConfig.context)return n;t==="class"||t==="className"?le(e,n):s&&!c&&!f?e[be(t)]=n:e[l||t]=n}else{const y=r&&t.indexOf(":")>-1&&oe[t.split(":")[0]];y?fe(e,y,t,n):M(e,te[t]||t,n)}return n}function $e(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}}),a.sharedConfig.registry&&!a.sharedConfig.done&&(a.sharedConfig.done=_$HY.done=!0);n;){const i=n[t];if(i&&!n.disabled){const r=n[`${t}Data`];if(r!==void 0?i.call(n,r,e):i.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function j(e,t,n,i,r){if(a.sharedConfig.context){!n&&(n=[...e.childNodes]);let c=[];for(let f=0;f<n.length;f++){const l=n[f];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():c.push(l)}n=c}for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,s=i!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(a.sharedConfig.context)return n;if(o==="number"&&(t=t.toString()),s){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=w(e,n,i,c)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(a.sharedConfig.context)return n;n=w(e,n,i)}else{if(o==="function")return a.createRenderEffect(()=>{let c=t();for(;typeof c=="function";)c=c();n=j(e,c,n,i)}),()=>n;if(Array.isArray(t)){const c=[],f=n&&Array.isArray(n);if(v(c,t,n,r))return a.createRenderEffect(()=>n=j(e,c,n,i,!0)),()=>n;if(a.sharedConfig.context){if(!c.length)return n;if(i===void 0)return[...e.childNodes];let l=c[0],d=[l];for(;(l=l.nextSibling)!==i;)d.push(l);return n=d}if(c.length===0){if(n=w(e,n,i),s)return n}else f?n.length===0?_(e,c,i):se(e,n,c):(n&&w(e),_(e,c));n=c}else if(t.nodeType){if(a.sharedConfig.context&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)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 v(e,t,n,i){let r=!1;for(let o=0,s=t.length;o<s;o++){let c=t[o],f=n&&n[e.length],l;if(!(c==null||c===!0||c===!1))if((l=typeof c)=="object"&&c.nodeType)e.push(c);else if(Array.isArray(c))r=v(e,c,f)||r;else if(l==="function")if(i){for(;typeof c=="function";)c=c();r=v(e,Array.isArray(c)?c:[c],Array.isArray(f)?f:[f])||r}else e.push(c),r=!0;else{const d=String(c);f&&f.nodeType===3&&f.data===d?e.push(f):e.push(document.createTextNode(d))}}return r}function _(e,t,n=null){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 o=!1;for(let s=t.length-1;s>=0;s--){const c=t[s];if(r!==c){const f=c.parentNode===e;!o&&!s?f?e.replaceChild(r,c):e.insertBefore(r,n):f&&c.remove()}else o=!0}}else e.insertBefore(r,n);return[r]}function Ce(){const e=a.sharedConfig.context;return`${e.id}${e.count++}`}const Se="http://www.w3.org/2000/svg";function je(e,t=!1){return t?document.createElementNS(Se,e):document.createElement(e)}function we(e){const[t,n]=a.splitProps(e,["component"]),i=a.createMemo(()=>t.component);return a.createMemo(()=>{const r=i();switch(typeof r){case"function":return a.untrack(()=>r(n));case"string":const o=ce.has(r),s=a.sharedConfig.context?he():je(r,o);return ye(s,n,o),s}})}function x(e){return e??void 0}function g(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,i)=>Object.defineProperty({...n},i,{get(){return e[i]},configurable:!0,enumerable:!0}),{})}function m(e,t){return a.createComponent(we,a.mergeProps({get component(){return e()}},t))}function h(e){return Object.values(e).every(t=>typeof t=="function")?Object.keys(e).reduce((t,n)=>{const i=e[n];return Object.defineProperty(t,n,{get(){return i()},configurable:!0,enumerable:!0})},{}):new Error("Please provide an object with accessor values only.")}const F=/^--\D{1}.{0,100}$/;function V(e){return F.test(e)}function I(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}.{0,100}\)$/,F].some(t=>t.test(e))}const{sizeXxs:xe,sizeXs:Ae,sizeSm:Pe,sizeMd:Ee,sizeLg:Te,sizeXl:Ie,sizeXxl:Me,sizeContent1:ve,sizeContent2:Oe,sizeContent3:ze,sizeHeader1:ke,sizeHeader2:Ne,sizeHeader3:Le,size000:We,size00:Be,size1:Re,size2:De,size3:Ge,size4:He,size5:_e,size6:Fe,size7:Ve,size8:Xe,size9:qe,size10:Ue,size11:Qe,size12:Ye,size13:Ze,size14:Ke,size15:pe}=A,Je={size000:We,size00:Be,size1:Re,size2:De,size3:Ge,size4:He,size5:_e,size6:Fe,size7:Ve,size8:Xe,size9:qe,size10:Ue,size11:Qe,size12:Ye,size13:Ze,size14:Ke,size15:pe},et={sizeXxs:xe,sizeXs:Ae,sizeSm:Pe,sizeMd:Ee,sizeLg:Te,sizeXl:Ie,sizeXxl:Me,sizeContent1:ve,sizeContent2:Oe,sizeContent3:ze,sizeHeader1:ke,sizeHeader2:Ne,sizeHeader3:Le},X=Je,q=et;function U(e){return e.reduce((t,[n,i])=>({...t,[n]:i}),{})}function O(e,t){if(t!==void 0)return typeof t=="number"&&t>=0?`${t}px`:typeof t=="string"&&I(t)?V(t)?`var(${t})`:t:x(b(e,t))}function b(e,t){const n=e.space??X,i=U(Object.entries(n).map(([r,o])=>[r,typeof o=="number"?`${o}px`:o]));return x(i[t])}function P(e,t){if(t===void 0)return;if(typeof t=="number"&&t>=0)return`${t}px`;if(typeof t=="string"&&I(t))return V(t)?`var(${t})`:t;const n=e.sizes??q,i=U(Object.entries(n).map(([r,o])=>[r,typeof o=="number"?`${o}px`:o]));return x(i[t])}function tt(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}function nt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),n=()=>`--maxWidth: ${tt(e.maxWidth)};`,i=()=>e.centerText?"center-text":"",r=()=>e.centerChildren?"center-children":"",o=()=>[i(),r()].filter(Boolean).join(" "),s=()=>[t(),n()].join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","maxWidth","centerText","centerChildren"]),h({style:s,"data-bedrock-center":o})))}const Q=a.createContext({});function it(e){return a.createComponent(Q.Provider,{get value(){return e.theme},get children(){return e.children}})}function $(){try{return a.useContext(Q)}catch{return{}}}function rt(e,t){return P(e,t)}function ct(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"}`,r=()=>`--minItemWidth: ${rt(t,e.minItemWidth)}`,o=()=>e.noStretchedColumns===!0?"no-stretched-columns":"",s=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","minItemWidth","noStretchedColumns"]),h({style:s,"data-bedrock-column-drop":o})))}function ot(e,t){const[n,i]=a.createSignal(!1),[r,o]=a.createSignal();return a.onMount(()=>{T.init()}),a.createEffect(()=>{if(x(r())===void 0)return;t&&t(r());const s=T.registerCallback(r(),c=>{var l;const f=((l=c.borderBoxSize)==null?void 0:l.inlineSize)??c.contentRect.width;if(f>0){const d=f<=e;i(d)}});a.onCleanup(s)}),[n,o]}function st(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 at(e){return Array.isArray(e)?e.join("/"):e}function ft(e){return st(e)?at(e):void 0}function lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),n=()=>ft(e.ratio),i=()=>n()?`--ratio: ${n()}`:"",r=()=>typeof e.position=="string"?`--position: ${e.position}`:"50%",o=()=>[t(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","ratio","position"]),h({style:o,"data-bedrock-frame":()=>""})))}function Y(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,r=()=>`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth??0}px`};`,o=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","minItemWidth"]),h({style:o,"data-bedrock-grid":()=>e.variant==="masonry"?"variant:masonry":""})))}const E=96;function Z(e){const t=String(e),n=parseFloat(t),[,i]=t.match(/[\d.\-+]*\s*(.*)/)??["",""];return[n,i]}function z(e,t){if(!e)return;const n=t??document.body,i=(e??"px").trim().toLowerCase();switch(i){case"vmin":case"vmax":case"vh":case"vw":case"%":return;case"ch":case"ex":return ut(i,n);case"em":return k(n,"font-size");case"rem":return k(document.body,"font-size");case"in":return E;case"cm":return E/2.54;case"mm":return E/25.4;case"pt":return E/72;case"pc":return E/6;case"px":return 1;default:{const[r,o]=Z(i);if(isNaN(r))return;if(!o)return r;const s=z(o,t);return typeof s=="number"?r*s:void 0}}}function k(e,t){const[n,i]=Z(getComputedStyle(e).getPropertyValue(t));return n*(z(i,e)??1)}function ut(e,t){const n=document.createElement("div");n.style.height="128"+e,t.appendChild(n);const i=k(n,"height")/128;return t.removeChild(n),i}var dt=B("<div>");const N=1,yt=typeof window=="object"&&typeof document=="object"&&document.nodeType===9,gt=e=>{const[t,n]=a.createSignal(1),[i,r]=a.createSignal(),o=$();return a.onMount(()=>(T.init(),0)),a.createEffect(()=>{const s=x(i());if(s===void 0)return;const c=T.registerCallback(s,({target:f})=>{n(1);const l=e.gutter?b(o,e.gutter)??"1px":"1px",d=yt?z(l,f):void 0,y=Math.max(d??N,N),[C]=Array.from(f.children),S=1+Math.min(f.scrollHeight,C.scrollHeight),L=Math.max(Math.ceil(S/y),N);return n(L),0});return a.onCleanup(c),0}),(()=>{var s=dt();return ge(r,s),D(s,()=>e.children),a.createRenderEffect(c=>R(s,`grid-row: span ${t()};`,c)),s})()},mt=e=>{const t=a.children(()=>e.children),i=[].concat(t()).filter(Boolean).map(r=>a.createComponent(gt,{get gutter(){return e.gutter},children:r}));return a.createComponent(Y,a.mergeProps({style:"grid-template-rows: 1px;"},e,{children:i}))},ht={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},bt={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function $t(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((f,[l,d])=>f+`${l}:${d};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,r=()=>e.justify!==void 0?ht[e.justify]:void 0,o=()=>e.align!==void 0?bt[e.align]:void 0,s=()=>[n(),i()].join("; "),c=()=>[r(),o()].filter(Boolean).join(" ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","justify","align"]),h({style:s,"data-bedrock-inline-cluster":c})))}const Ct={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},St={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function jt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((y,[C,S])=>y+`${C}:${S};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,r=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,o=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",s=()=>e.justify!==void 0?Ct[e.justify]:void 0,c=()=>e.align!==void 0?St[e.align]:void 0,f=()=>e.stretch?`stretch:${e.stretch}`:void 0,l=()=>[n(),i(),o(),r()].join("; "),d=()=>[s(),c(),f()].filter(Boolean).join(" ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","justify","align","stretch","switchAt"]),h({style:l,"data-bedrock-inline":d})))}const wt=e=>({left:"padding-inline-start",right:"padding-inline-end",top:"padding-block-start",bottom:"padding-block-end",inlineStart:"padding-inline-start",inlineEnd:"padding-inline-end",blockStart:"padding-block-start",blockEnd:"padding-block-end"})[e],xt=(e,t)=>{if(!t)return"";if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((i,[r,o])=>({...i,[wt(r)]:O(e,o)??"0px"}),{}):{padding:Array.from(Array.isArray(t)?t:[t]).map(i=>O(e,i)??"0px").join(" ")};return Object.entries(n).reduce((i,[r,o])=>i+`${r}:${o};`,"")};function At(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[s,c])=>o+`${s}:${c};`,""),i=()=>xt(t,e.padding),r=()=>[n(),i()].join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","padding"]),h({style:r,"data-bedrock-padbox":()=>""})))}function Pt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,r=()=>{switch(e.snapType){case"none":return"snapType:none";case"proximity":return"snapType:proximity";case"mandatory":return"snapType:mandatory";default:return"snapType:none"}},o=()=>[n(),i()].join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","gutter"]),h({style:o,"data-bedrock-reel":r})))}const K={"1/4":"fraction:1/4","1/3":"fraction:1/3","1/2":"fraction:1/2","2/3":"fraction:2/3","3/4":"fraction:3/4","auto-start":"fraction:auto-start","auto-end":"fraction:auto-end"};function Et(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((f,[l,d])=>f+`${l}:${d};`,""),i=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",r=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,o=()=>K[e.fraction??"1/2"]??K["1/2"],s=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,c=()=>[n(),r(),i(),s()].join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","fraction"]),h({style:c,"data-bedrock-split":o})))}const Tt={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function It(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,r=()=>[n(),i()].join("; "),o=()=>e.align!==void 0?Tt[e.align]:void 0,s=()=>[o()].filter(Boolean).join(" ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","gutter"]),h({style:r,"data-bedrock-stack":s})))}var Mt=B("<div data-bedrock-cover-centered>");function vt(e){return typeof e=="number"?`${e}px`:e&&I(e)?e:"100vh"}function Ot(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,r=()=>`--minHeight: ${vt(e.minHeight)};`,o=()=>e.stretchContent===!0?"stretch-content":"",s=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","minHeight","stretchContent"]),h({style:s,"data-bedrock-cover":o})))}function zt(e){const[t,n]=a.splitProps(e,["children","top","bottom"]);return a.createComponent(Ot,a.mergeProps(n,{get children(){return[a.createMemo(()=>t.top),(()=>{var i=Mt();return D(i,()=>t.children),i})(),a.createMemo(()=>t.bottom)]}}))}function kt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gutter??"size00")??"0px"};`,r=()=>`--columns: ${x(Math.max(e.colCount??e.columns??1,1))??1};`,o=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",s=()=>[n(),i(),r(),o()].filter(Boolean).join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","columns","colCount","switchAt"]),h({style:s,"data-bedrock-columns":()=>""})))}const Nt=e=>typeof e=="number"?e:1;function Lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),n=()=>`--span: ${Nt(e.span)};`,i=()=>e.offsetStart&&e.offsetStart>0?`--offsetStart: ${e.offsetStart};`:"",r=()=>e.offsetEnd&&e.offsetEnd>0?`--offsetEnd: ${e.offsetEnd};`:"",o=()=>[t(),n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(g(e,["as","span","offsetStart","offsetEnd"]),h({style:o,"data-bedrock-column":()=>""})))}u.Center=nt,u.Column=Lt,u.ColumnDrop=ct,u.Columns=kt,u.Cover=zt,u.Frame=lt,u.Grid=Y,u.Inline=jt,u.InlineCluster=$t,u.MasonryGrid=mt,u.PadBox=At,u.Reel=Pt,u.Split=Et,u.Stack=It,u.ThemeProvider=it,u.checkIsCSSLength=I,u.createContainerQuery=ot,u.getSafeGutter=O,u.getSizeValue=P,u.getSpacingValue=b,u.sizes=q,u.spacing=X,u.useTheme=$,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
1
+ (function(u,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("open-props"),require("solid-js"),require("@bedrock-layout/register-resize-callback")):typeof define=="function"&&define.amd?define(["exports","open-props","solid-js","@bedrock-layout/register-resize-callback"],A):(u=typeof globalThis<"u"?globalThis:u||self,A(u.solid={},u.OpenProps,u.solidJs,u.registerResizeCallback))})(this,function(u,A,a,T){"use strict";const p=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],J=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...p]),ee=new Set(["innerHTML","textContent","innerText","children"]),te=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),ne=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function ie(e,t){const n=ne[e];return typeof n=="object"?n[t]?n.$:void 0:n}const re=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),ce=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),oe={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function se(e,t,n){let i=n.length,r=t.length,o=i,s=0,c=0,f=t[r-1].nextSibling,l=null;for(;s<r||c<o;){if(t[s]===n[c]){s++,c++;continue}for(;t[r-1]===n[o-1];)r--,o--;if(r===s){const d=o<i?c?n[c-1].nextSibling:n[o-c]:f;for(;c<o;)e.insertBefore(n[c++],d)}else if(o===c)for(;s<r;)(!l||!l.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[o-1]&&n[c]===t[r-1]){const d=t[--r].nextSibling;e.insertBefore(n[c++],t[s++].nextSibling),e.insertBefore(n[--o],d),t[r]=n[o]}else{if(!l){l=new Map;let g=c;for(;g<o;)l.set(n[g],g++)}const d=l.get(t[s]);if(d!=null)if(c<d&&d<o){let g=s,C=1,S;for(;++g<r&&g<o&&!((S=l.get(t[g]))==null||S!==d+C);)C++;if(C>d-c){const L=t[s];for(;c<d;)e.insertBefore(n[c++],L)}else e.replaceChild(n[c++],t[s++])}else s++;else t[s++].remove()}}}const W="_$DX_DELEGATE";function B(e,t,n){let i;const r=()=>{const s=document.createElement("template");return s.innerHTML=e,n?s.content.firstChild.firstChild:s.content.firstChild},o=t?()=>a.untrack(()=>document.importNode(i||(i=r()),!0)):()=>(i||(i=r())).cloneNode(!0);return o.cloneNode=o,o}function ae(e,t=window.document){const n=t[W]||(t[W]=new Set);for(let i=0,r=e.length;i<r;i++){const o=e[i];n.has(o)||(n.add(o),t.addEventListener(o,$e))}}function M(e,t,n){a.sharedConfig.context||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function fe(e,t,n,i){a.sharedConfig.context||(i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i))}function le(e,t){a.sharedConfig.context||(t==null?e.removeAttribute("class"):e.className=t)}function ue(e,t,n,i){if(i)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=o=>r.call(e,n[1],o))}else e.addEventListener(t,n)}function de(e,t,n={}){const i=Object.keys(t||{}),r=Object.keys(n);let o,s;for(o=0,s=r.length;o<s;o++){const c=r[o];!c||c==="undefined"||t[c]||(G(e,c,!1),delete n[c])}for(o=0,s=i.length;o<s;o++){const c=i[o],f=!!t[c];!c||c==="undefined"||n[c]===f||!f||(G(e,c,!0),n[c]=f)}return n}function R(e,t,n){if(!t)return n?M(e,"style"):t;const i=e.style;if(typeof t=="string")return i.cssText=t;typeof n=="string"&&(i.cssText=n=void 0),n||(n={}),t||(t={});let r,o;for(o in n)t[o]==null&&i.removeProperty(o),delete n[o];for(o in t)r=t[o],r!==n[o]&&(i.setProperty(o,r),n[o]=r);return n}function ge(e,t={},n,i){const r={};return i||a.createRenderEffect(()=>r.children=j(e,t.children,r.children)),a.createRenderEffect(()=>t.ref&&t.ref(e)),a.createRenderEffect(()=>me(e,t,n,!0,r,!0)),r}function ye(e,t,n){return a.untrack(()=>e(t,n))}function D(e,t,n,i){if(n!==void 0&&!i&&(i=[]),typeof t!="function")return j(e,t,i,n);a.createRenderEffect(r=>j(e,t(),r,n),i)}function me(e,t,n,i,r={},o=!1){t||(t={});for(const s in r)if(!(s in t)){if(s==="children")continue;r[s]=H(e,s,null,r[s],n,o)}for(const s in t){if(s==="children"){i||j(e,t.children);continue}const c=t[s];r[s]=H(e,s,c,r[s],n,o)}}function he(e){let t,n;return!a.sharedConfig.context||!(t=a.sharedConfig.registry.get(n=Ce()))?e():(a.sharedConfig.completed&&a.sharedConfig.completed.add(t),a.sharedConfig.registry.delete(n),t)}function be(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function G(e,t,n){const i=t.trim().split(/\s+/);for(let r=0,o=i.length;r<o;r++)e.classList.toggle(i[r],n)}function H(e,t,n,i,r,o){let s,c,f,l,d;if(t==="style")return R(e,n,i);if(t==="classList")return de(e,n,i);if(n===i)return i;if(t==="ref")o||n(e);else if(t.slice(0,3)==="on:"){const g=t.slice(3);i&&e.removeEventListener(g,i),n&&e.addEventListener(g,n)}else if(t.slice(0,10)==="oncapture:"){const g=t.slice(10);i&&e.removeEventListener(g,i,!0),n&&e.addEventListener(g,n,!0)}else if(t.slice(0,2)==="on"){const g=t.slice(2).toLowerCase(),C=re.has(g);if(!C&&i){const S=Array.isArray(i)?i[0]:i;e.removeEventListener(g,S)}(C||n)&&(ue(e,g,n,C),C&&ae([g]))}else if(t.slice(0,5)==="attr:")M(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(f=ee.has(t))||!r&&((l=ie(t,e.tagName))||(c=J.has(t)))||(s=e.nodeName.includes("-"))){if(d)t=t.slice(5),c=!0;else if(a.sharedConfig.context)return n;t==="class"||t==="className"?le(e,n):s&&!c&&!f?e[be(t)]=n:e[l||t]=n}else{const g=r&&t.indexOf(":")>-1&&oe[t.split(":")[0]];g?fe(e,g,t,n):M(e,te[t]||t,n)}return n}function $e(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}}),a.sharedConfig.registry&&!a.sharedConfig.done&&(a.sharedConfig.done=_$HY.done=!0);n;){const i=n[t];if(i&&!n.disabled){const r=n[`${t}Data`];if(r!==void 0?i.call(n,r,e):i.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function j(e,t,n,i,r){if(a.sharedConfig.context){!n&&(n=[...e.childNodes]);let c=[];for(let f=0;f<n.length;f++){const l=n[f];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():c.push(l)}n=c}for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,s=i!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(a.sharedConfig.context)return n;if(o==="number"&&(t=t.toString()),s){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=w(e,n,i,c)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(a.sharedConfig.context)return n;n=w(e,n,i)}else{if(o==="function")return a.createRenderEffect(()=>{let c=t();for(;typeof c=="function";)c=c();n=j(e,c,n,i)}),()=>n;if(Array.isArray(t)){const c=[],f=n&&Array.isArray(n);if(v(c,t,n,r))return a.createRenderEffect(()=>n=j(e,c,n,i,!0)),()=>n;if(a.sharedConfig.context){if(!c.length)return n;if(i===void 0)return[...e.childNodes];let l=c[0],d=[l];for(;(l=l.nextSibling)!==i;)d.push(l);return n=d}if(c.length===0){if(n=w(e,n,i),s)return n}else f?n.length===0?_(e,c,i):se(e,n,c):(n&&w(e),_(e,c));n=c}else if(t.nodeType){if(a.sharedConfig.context&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)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 v(e,t,n,i){let r=!1;for(let o=0,s=t.length;o<s;o++){let c=t[o],f=n&&n[e.length],l;if(!(c==null||c===!0||c===!1))if((l=typeof c)=="object"&&c.nodeType)e.push(c);else if(Array.isArray(c))r=v(e,c,f)||r;else if(l==="function")if(i){for(;typeof c=="function";)c=c();r=v(e,Array.isArray(c)?c:[c],Array.isArray(f)?f:[f])||r}else e.push(c),r=!0;else{const d=String(c);f&&f.nodeType===3&&f.data===d?e.push(f):e.push(document.createTextNode(d))}}return r}function _(e,t,n=null){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 o=!1;for(let s=t.length-1;s>=0;s--){const c=t[s];if(r!==c){const f=c.parentNode===e;!o&&!s?f?e.replaceChild(r,c):e.insertBefore(r,n):f&&c.remove()}else o=!0}}else e.insertBefore(r,n);return[r]}function Ce(){const e=a.sharedConfig.context;return`${e.id}${e.count++}`}const Se="http://www.w3.org/2000/svg";function je(e,t=!1){return t?document.createElementNS(Se,e):document.createElement(e)}function we(e){const[t,n]=a.splitProps(e,["component"]),i=a.createMemo(()=>t.component);return a.createMemo(()=>{const r=i();switch(typeof r){case"function":return a.untrack(()=>r(n));case"string":const o=ce.has(r),s=a.sharedConfig.context?he():je(r,o);return ge(s,n,o),s}})}function x(e){return e??void 0}function y(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,i)=>Object.defineProperty({...n},i,{get(){return e[i]},configurable:!0,enumerable:!0}),{})}function m(e,t){return a.createComponent(we,a.mergeProps({get component(){return e()}},t))}function h(e){return Object.values(e).every(t=>typeof t=="function")?Object.keys(e).reduce((t,n)=>{const i=e[n];return Object.defineProperty(t,n,{get(){return i()},configurable:!0,enumerable:!0})},{}):new Error("Please provide an object with accessor values only.")}const F=/^--\D{1}.{0,100}$/;function V(e){return F.test(e)}function I(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}.{0,100}\)$/,F].some(t=>t.test(e))}const{sizeXxs:xe,sizeXs:Ae,sizeSm:Pe,sizeMd:Ee,sizeLg:Te,sizeXl:Ie,sizeXxl:Me,sizeContent1:ve,sizeContent2:Oe,sizeContent3:ze,sizeHeader1:ke,sizeHeader2:Ne,sizeHeader3:Le,size000:We,size00:Be,size1:Re,size2:De,size3:Ge,size4:He,size5:_e,size6:Fe,size7:Ve,size8:Xe,size9:qe,size10:Ue,size11:Qe,size12:Ye,size13:Ze,size14:Ke,size15:pe}=A,Je={size000:We,size00:Be,size1:Re,size2:De,size3:Ge,size4:He,size5:_e,size6:Fe,size7:Ve,size8:Xe,size9:qe,size10:Ue,size11:Qe,size12:Ye,size13:Ze,size14:Ke,size15:pe},et={sizeXxs:xe,sizeXs:Ae,sizeSm:Pe,sizeMd:Ee,sizeLg:Te,sizeXl:Ie,sizeXxl:Me,sizeContent1:ve,sizeContent2:Oe,sizeContent3:ze,sizeHeader1:ke,sizeHeader2:Ne,sizeHeader3:Le},X=Je,q=et;function U(e){return e.reduce((t,[n,i])=>({...t,[n]:i}),{})}function O(e,t){if(t!==void 0)return typeof t=="number"&&t>=0?`${t}px`:typeof t=="string"&&I(t)?V(t)?`var(${t})`:t:x(b(e,t))}function b(e,t){const n=e.space??X,i=U(Object.entries(n).map(([r,o])=>[r,typeof o=="number"?`${o}px`:o]));return x(i[t])}function P(e,t){if(t===void 0)return;if(typeof t=="number"&&t>=0)return`${t}px`;if(typeof t=="string"&&I(t))return V(t)?`var(${t})`:t;const n=e.sizes??q,i=U(Object.entries(n).map(([r,o])=>[r,typeof o=="number"?`${o}px`:o]));return x(i[t])}function tt(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}function nt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),n=()=>`--maxWidth: ${tt(e.maxWidth)};`,i=()=>e.centerText?"center-text":"",r=()=>e.centerChildren?"center-children":"",o=()=>[i(),r()].filter(Boolean).join(" "),s=()=>[t(),n()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","maxWidth","centerText","centerChildren"]),h({style:s,"data-bedrock-center":o})))}const Q=a.createContext({});function it(e){return a.createComponent(Q.Provider,{get value(){return e.theme},get children(){return e.children}})}function $(){try{return a.useContext(Q)}catch{return{}}}function rt(e,t){return P(e,t)}function ct(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--minItemWidth: ${rt(t,e.minItemWidth)}`,o=()=>e.noStretchedColumns===!0?"no-stretched-columns":"",s=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","minItemWidth","noStretchedColumns"]),h({style:s,"data-bedrock-column-drop":o})))}function ot(e,t){const[n,i]=a.createSignal(!1),[r,o]=a.createSignal();return a.onMount(()=>{T.init()}),a.createEffect(()=>{if(x(r())===void 0)return;t&&t(r());const s=T.registerCallback(r(),c=>{var l;const f=((l=c.borderBoxSize)==null?void 0:l.inlineSize)??c.contentRect.width;if(f>0){const d=f<=e;i(d)}});a.onCleanup(s)}),[n,o]}function st(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 at(e){return Array.isArray(e)?e.join("/"):e}function ft(e){return st(e)?at(e):void 0}function lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),n=()=>ft(e.ratio),i=()=>n()?`--ratio: ${n()}`:"",r=()=>typeof e.position=="string"?`--position: ${e.position}`:"50%",o=()=>[t(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","ratio","position"]),h({style:o,"data-bedrock-frame":()=>""})))}function Y(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth??0}px`};`,o=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","minItemWidth"]),h({style:o,"data-bedrock-grid":()=>e.variant==="masonry"?"variant:masonry":""})))}const E=96;function Z(e){const t=String(e),n=parseFloat(t),[,i]=t.match(/[\d.\-+]*\s*(.*)/)??["",""];return[n,i]}function z(e,t){if(!e)return;const n=t??document.body,i=(e??"px").trim().toLowerCase();switch(i){case"vmin":case"vmax":case"vh":case"vw":case"%":return;case"ch":case"ex":return ut(i,n);case"em":return k(n,"font-size");case"rem":return k(document.body,"font-size");case"in":return E;case"cm":return E/2.54;case"mm":return E/25.4;case"pt":return E/72;case"pc":return E/6;case"px":return 1;default:{const[r,o]=Z(i);if(isNaN(r))return;if(!o)return r;const s=z(o,t);return typeof s=="number"?r*s:void 0}}}function k(e,t){const[n,i]=Z(getComputedStyle(e).getPropertyValue(t));return n*(z(i,e)??1)}function ut(e,t){const n=document.createElement("div");n.style.height="128"+e,t.appendChild(n);const i=k(n,"height")/128;return t.removeChild(n),i}var dt=B("<div>");const N=1,gt=typeof window=="object"&&typeof document=="object"&&document.nodeType===9,yt=e=>{const[t,n]=a.createSignal(1),[i,r]=a.createSignal(),o=$();return a.onMount(()=>(T.init(),0)),a.createEffect(()=>{const s=x(i());if(s===void 0)return;const c=T.registerCallback(s,({target:f})=>{n(1);const l=e.gutter?b(o,e.gutter)??"1px":"1px",d=gt?z(l,f):void 0,g=Math.max(d??N,N),[C]=Array.from(f.children),S=1+Math.min(f.scrollHeight,C.scrollHeight),L=Math.max(Math.ceil(S/g),N);return n(L),0});return a.onCleanup(c),0}),(()=>{var s=dt();return ye(r,s),D(s,()=>e.children),a.createRenderEffect(c=>R(s,`grid-row: span ${t()};`,c)),s})()},mt=e=>{const t=a.children(()=>e.children),i=[].concat(t()).filter(Boolean).map(r=>a.createComponent(yt,{get gutter(){return e.gutter},children:r}));return a.createComponent(Y,a.mergeProps({style:"grid-template-rows: 1px;"},e,{children:i}))},ht={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},bt={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function $t(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((f,[l,d])=>f+`${l}:${d};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>e.justify!==void 0?ht[e.justify]:void 0,o=()=>e.align!==void 0?bt[e.align]:void 0,s=()=>[n(),i()].join("; "),c=()=>[r(),o()].filter(Boolean).join(" ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","justify","align"]),h({style:s,"data-bedrock-inline-cluster":c})))}const Ct={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},St={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function jt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((g,[C,S])=>g+`${C}:${S};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,o=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",s=()=>e.justify!==void 0?Ct[e.justify]:void 0,c=()=>e.align!==void 0?St[e.align]:void 0,f=()=>e.stretch?`stretch:${e.stretch}`:void 0,l=()=>[n(),i(),o(),r()].join("; "),d=()=>[s(),c(),f()].filter(Boolean).join(" ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","justify","align","stretch","switchAt"]),h({style:l,"data-bedrock-inline":d})))}const wt=e=>({left:"padding-inline-start",right:"padding-inline-end",top:"padding-block-start",bottom:"padding-block-end",inlineStart:"padding-inline-start",inlineEnd:"padding-inline-end",blockStart:"padding-block-start",blockEnd:"padding-block-end"})[e],xt=(e,t)=>{if(!t)return"";if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((i,[r,o])=>({...i,[wt(r)]:O(e,o)??"0px"}),{}):{padding:Array.from(Array.isArray(t)?t:[t]).map(i=>O(e,i)??"0px").join(" ")};return Object.entries(n).reduce((i,[r,o])=>i+`${r}:${o};`,"")};function At(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[s,c])=>o+`${s}:${c};`,""),i=()=>xt(t,e.padding),r=()=>[n(),i()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","padding"]),h({style:r,"data-bedrock-padbox":()=>""})))}function Pt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>{switch(e.snapType){case"none":return"snapType:none";case"proximity":return"snapType:proximity";case"mandatory":return"snapType:mandatory";default:return"snapType:none"}},o=()=>[n(),i()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter"]),h({style:o,"data-bedrock-reel":r})))}const K={"1/4":"fraction:1/4","1/3":"fraction:1/3","1/2":"fraction:1/2","2/3":"fraction:2/3","3/4":"fraction:3/4","auto-start":"fraction:auto-start","auto-end":"fraction:auto-end"};function Et(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((f,[l,d])=>f+`${l}:${d};`,""),i=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",r=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,o=()=>K[e.fraction??"1/2"]??K["1/2"],s=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,c=()=>[n(),r(),i(),s()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","fraction"]),h({style:c,"data-bedrock-split":o})))}const Tt={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function It(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>[n(),i()].join("; "),o=()=>e.align!==void 0?Tt[e.align]:void 0,s=()=>[o()].filter(Boolean).join(" ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter"]),h({style:r,"data-bedrock-stack":s})))}var Mt=B("<div data-bedrock-cover-centered>");function vt(e){return typeof e=="number"?`${e}px`:e&&I(e)?e:"100vh"}function Ot(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--minHeight: ${vt(e.minHeight)};`,o=()=>e.stretchContent===!0?"stretch-content":"",s=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","minHeight","stretchContent"]),h({style:s,"data-bedrock-cover":o})))}function zt(e){const[t,n]=a.splitProps(e,["children","top","bottom"]);return a.createComponent(Ot,a.mergeProps(n,{get children(){return[a.createMemo(()=>t.top),(()=>{var i=Mt();return D(i,()=>t.children),i})(),a.createMemo(()=>t.bottom)]}}))}function kt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--columns: ${x(Math.max(e.colCount??e.columns??1,1))??1};`,o=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",s=()=>[n(),i(),r(),o()].filter(Boolean).join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","columns","colCount","switchAt"]),h({style:s,"data-bedrock-columns":()=>""})))}const Nt=e=>typeof e=="number"?e:1;function Lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),n=()=>`--span: ${Nt(e.span)};`,i=()=>e.offsetStart&&e.offsetStart>0?`--offsetStart: ${e.offsetStart};`:"",r=()=>e.offsetEnd&&e.offsetEnd>0?`--offsetEnd: ${e.offsetEnd};`:"",o=()=>[t(),n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","span","offsetStart","offsetEnd"]),h({style:o,"data-bedrock-column":()=>""})))}u.Center=nt,u.Column=Lt,u.ColumnDrop=ct,u.Columns=kt,u.Cover=zt,u.Frame=lt,u.Grid=Y,u.Inline=jt,u.InlineCluster=$t,u.MasonryGrid=mt,u.PadBox=At,u.Reel=Pt,u.Split=Et,u.Stack=It,u.ThemeProvider=it,u.checkIsCSSLength=I,u.createContainerQuery=ot,u.getSafeGutter=O,u.getSizeValue=P,u.getSpacingValue=b,u.sizes=q,u.spacing=X,u.useTheme=$,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
@@ -17,7 +17,11 @@ declare const alignMap: {
17
17
  export interface InlineClusterBaseProps {
18
18
  justify?: keyof typeof justifyMap;
19
19
  align?: keyof typeof alignMap;
20
- gutter: SpacingOptions;
20
+ /**
21
+ * @deprecated Use `gap` instead
22
+ */
23
+ gutter?: SpacingOptions;
24
+ gap?: SpacingOptions;
21
25
  }
22
26
  export type InlineClusterProps<T extends ValidConstructor = "div"> = HeadlessPropsWithRef<T, InlineClusterBaseProps>;
23
27
  export declare function InlineCluster<T extends ValidConstructor = "div">(props: Readonly<InlineClusterProps<T>>): JSX.Element;
package/lib/inline.d.ts CHANGED
@@ -21,7 +21,11 @@ export interface InlineBaseProps {
21
21
  switchAt?: number | CSSLength | SizesOptions;
22
22
  justify?: keyof typeof justifyMap;
23
23
  align?: keyof typeof alignMap;
24
+ /**
25
+ * @deprecated Use `gap` instead
26
+ */
24
27
  gutter?: SpacingOptions;
28
+ gap?: SpacingOptions;
25
29
  minItemWidth?: MinItemWidth;
26
30
  }
27
31
  export type InlineProps<T extends ValidConstructor = "div"> = HeadlessPropsWithRef<T, InlineBaseProps>;
package/lib/reel.d.ts CHANGED
@@ -3,7 +3,11 @@ import { SpacingOptions } from "./spacing-constants";
3
3
  import { HeadlessPropsWithRef, ValidConstructor } from "./typeUtils";
4
4
  export interface ReelBaseProps {
5
5
  snapType?: "none" | "proximity" | "mandatory";
6
+ /**
7
+ * @deprecated Use `gap` instead
8
+ */
6
9
  gutter?: SpacingOptions;
10
+ gap?: SpacingOptions;
7
11
  }
8
12
  export type ReelProps<T extends ValidConstructor = "div"> = HeadlessPropsWithRef<T, ReelBaseProps>;
9
13
  export declare function Reel<T extends ValidConstructor = "div">(props: Readonly<ReelProps<T>>): JSX.Element;
package/lib/split.d.ts CHANGED
@@ -4,7 +4,11 @@ import { HeadlessPropsWithRef, ValidConstructor } from "./typeUtils";
4
4
  type FractionTypes = "auto-start" | "auto-end" | "1/4" | "1/3" | "1/2" | "2/3" | "3/4";
5
5
  type MinItemWidth = CSSLength | number | SizesOptions | "fit-content" | "max-content" | "min-content" | "auto";
6
6
  interface SplitBase {
7
+ /**
8
+ * @deprecated Use `gap` instead
9
+ */
7
10
  gutter?: SpacingOptions;
11
+ gap?: SpacingOptions;
8
12
  minItemWidth?: MinItemWidth;
9
13
  fraction?: FractionTypes;
10
14
  switchAt?: number | CSSLength;
package/lib/stack.d.ts CHANGED
@@ -8,7 +8,11 @@ declare const alignMap: {
8
8
  readonly stretch: "align:stretch";
9
9
  };
10
10
  export interface StackPropsBase {
11
+ /**
12
+ * @deprecated Use `gap` instead
13
+ */
11
14
  gutter?: SpacingOptions;
15
+ gap?: SpacingOptions;
12
16
  align?: keyof typeof alignMap;
13
17
  }
14
18
  export type StackProps<T extends ValidConstructor = "div"> = HeadlessPropsWithRef<T, StackPropsBase>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrock-layout/solid",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Solid Foundational Layout Primitives for your Solid-js App",
5
5
  "info": "Solid Bedrock Layout is a Solid.js port of the Bedrock Layout primitives written for react. Bedrock primitives are built to allow you to compose them together to create your own custom layouts. Many 'complex' layouts can be created by composing Bedrock Layout Primitives",
6
6
  "sideEffects": false,
@@ -71,5 +71,5 @@
71
71
  "bugs": {
72
72
  "url": "https://github.com/Bedrock-Layouts/Solid-Bedrock/issues"
73
73
  },
74
- "gitHead": "1336d37e8ab340160904502007320a5b5a2b841c"
74
+ "gitHead": "27093923ddbe222091acdc18493405cef6e29711"
75
75
  }