@bedrock-layout/solid 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs.js +1 -1
- package/lib/index.m.js +74 -70
- package/lib/index.umd.js +1 -1
- package/lib/inline-cluster.d.ts +2 -0
- package/lib/inline.d.ts +2 -0
- package/package.json +2 -2
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(()=>me(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 me(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 ye(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?ye():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 m(e,t){return l.createComponent(xe,l.mergeProps({get component(){return e()}},t))}function y(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 m(()=>e.as??"div",l.mergeProps(g(e,["as","maxWidth","centerText","centerChildren"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","minItemWidth","noStretchedColumns"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","ratio","position"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","minItemWidth"]),y({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})()},mt=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}))},yt={start:"justify:start",end:"justify:end",center:"justify:center"},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?yt[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 m(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","justify","align"]),y({style:c,"data-bedrock-inline-cluster":o})))}const $t={start:"justify:start",end:"justify:end",center:"justify:center"},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 m(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","justify","align","stretch","switchAt"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","padding"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","gutter"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","fraction"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","gutter"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","minHeight","stretchContent"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","columns","colCount","switchAt"]),y({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 m(()=>e.as??"div",l.mergeProps(g(e,["as","span","offsetStart","offsetEnd"]),y({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=mt;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"),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=$;
|
package/lib/index.m.js
CHANGED
|
@@ -27,7 +27,7 @@ const lt = [
|
|
|
27
27
|
"reversed",
|
|
28
28
|
"seamless",
|
|
29
29
|
"selected"
|
|
30
|
-
],
|
|
30
|
+
], at = /* @__PURE__ */ new Set([
|
|
31
31
|
"className",
|
|
32
32
|
"value",
|
|
33
33
|
"readOnly",
|
|
@@ -36,7 +36,7 @@ const lt = [
|
|
|
36
36
|
"noModule",
|
|
37
37
|
"playsInline",
|
|
38
38
|
...lt
|
|
39
|
-
]),
|
|
39
|
+
]), ft = /* @__PURE__ */ new Set([
|
|
40
40
|
"innerHTML",
|
|
41
41
|
"textContent",
|
|
42
42
|
"innerText",
|
|
@@ -177,8 +177,8 @@ const mt = /* @__PURE__ */ new Set([
|
|
|
177
177
|
xlink: "http://www.w3.org/1999/xlink",
|
|
178
178
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
179
179
|
};
|
|
180
|
-
function
|
|
181
|
-
let i = n.length, s = e.length, c = i, r = 0, o = 0, l = e[s - 1].nextSibling,
|
|
180
|
+
function bt(t, e, n) {
|
|
181
|
+
let i = n.length, s = e.length, c = i, r = 0, o = 0, l = e[s - 1].nextSibling, a = null;
|
|
182
182
|
for (; r < s || o < c; ) {
|
|
183
183
|
if (e[r] === n[o]) {
|
|
184
184
|
r++, o++;
|
|
@@ -187,31 +187,31 @@ function $t(t, e, n) {
|
|
|
187
187
|
for (; e[s - 1] === n[c - 1]; )
|
|
188
188
|
s--, c--;
|
|
189
189
|
if (s === r) {
|
|
190
|
-
const
|
|
190
|
+
const f = c < i ? o ? n[o - 1].nextSibling : n[c - o] : l;
|
|
191
191
|
for (; o < c; )
|
|
192
|
-
t.insertBefore(n[o++],
|
|
192
|
+
t.insertBefore(n[o++], f);
|
|
193
193
|
} else if (c === o)
|
|
194
194
|
for (; r < s; )
|
|
195
|
-
(!
|
|
195
|
+
(!a || !a.has(e[r])) && e[r].remove(), r++;
|
|
196
196
|
else if (e[r] === n[c - 1] && n[o] === e[s - 1]) {
|
|
197
|
-
const
|
|
198
|
-
t.insertBefore(n[o++], e[r++].nextSibling), t.insertBefore(n[--c],
|
|
197
|
+
const f = e[--s].nextSibling;
|
|
198
|
+
t.insertBefore(n[o++], e[r++].nextSibling), t.insertBefore(n[--c], f), e[s] = n[c];
|
|
199
199
|
} else {
|
|
200
|
-
if (!
|
|
201
|
-
|
|
200
|
+
if (!a) {
|
|
201
|
+
a = /* @__PURE__ */ new Map();
|
|
202
202
|
let u = o;
|
|
203
203
|
for (; u < c; )
|
|
204
|
-
|
|
204
|
+
a.set(n[u], u++);
|
|
205
205
|
}
|
|
206
|
-
const
|
|
207
|
-
if (
|
|
208
|
-
if (o <
|
|
209
|
-
let u = r,
|
|
210
|
-
for (; ++u < s && u < c && !((S =
|
|
211
|
-
|
|
212
|
-
if (
|
|
206
|
+
const f = a.get(e[r]);
|
|
207
|
+
if (f != null)
|
|
208
|
+
if (o < f && f < c) {
|
|
209
|
+
let u = r, b = 1, S;
|
|
210
|
+
for (; ++u < s && u < c && !((S = a.get(e[u])) == null || S !== f + b); )
|
|
211
|
+
b++;
|
|
212
|
+
if (b > f - o) {
|
|
213
213
|
const P = e[r];
|
|
214
|
-
for (; o <
|
|
214
|
+
for (; o < f; )
|
|
215
215
|
t.insertBefore(n[o++], P);
|
|
216
216
|
} else
|
|
217
217
|
t.replaceChild(n[o++], e[r++]);
|
|
@@ -231,7 +231,7 @@ function J(t, e, n) {
|
|
|
231
231
|
}, c = e ? () => L(() => document.importNode(i || (i = s()), !0)) : () => (i || (i = s())).cloneNode(!0);
|
|
232
232
|
return c.cloneNode = c, c;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function $t(t, e = window.document) {
|
|
235
235
|
const n = e[R] || (e[R] = /* @__PURE__ */ new Set());
|
|
236
236
|
for (let i = 0, s = t.length; i < s; i++) {
|
|
237
237
|
const c = t[i];
|
|
@@ -327,7 +327,7 @@ function D(t, e, n) {
|
|
|
327
327
|
t.classList.toggle(i[s], n);
|
|
328
328
|
}
|
|
329
329
|
function G(t, e, n, i, s, c) {
|
|
330
|
-
let r, o, l,
|
|
330
|
+
let r, o, l, a, f;
|
|
331
331
|
if (e === "style")
|
|
332
332
|
return Z(t, n, i);
|
|
333
333
|
if (e === "classList")
|
|
@@ -343,20 +343,20 @@ function G(t, e, n, i, s, c) {
|
|
|
343
343
|
const u = e.slice(10);
|
|
344
344
|
i && t.removeEventListener(u, i, !0), n && t.addEventListener(u, n, !0);
|
|
345
345
|
} else if (e.slice(0, 2) === "on") {
|
|
346
|
-
const u = e.slice(2).toLowerCase(),
|
|
347
|
-
if (
|
|
346
|
+
const u = e.slice(2).toLowerCase(), b = mt.has(u);
|
|
347
|
+
if (!b && i) {
|
|
348
348
|
const S = Array.isArray(i) ? i[0] : i;
|
|
349
349
|
t.removeEventListener(u, S);
|
|
350
350
|
}
|
|
351
|
-
(
|
|
351
|
+
(b || n) && (wt(t, u, n, b), b && $t([u]));
|
|
352
352
|
} else if (e.slice(0, 5) === "attr:")
|
|
353
353
|
z(t, e.slice(5), n);
|
|
354
|
-
else if ((
|
|
355
|
-
if (
|
|
354
|
+
else if ((f = e.slice(0, 5) === "prop:") || (l = ft.has(e)) || !s && ((a = yt(e, t.tagName)) || (o = at.has(e))) || (r = t.nodeName.includes("-"))) {
|
|
355
|
+
if (f)
|
|
356
356
|
e = e.slice(5), o = !0;
|
|
357
357
|
else if (d.context)
|
|
358
358
|
return n;
|
|
359
|
-
e === "class" || e === "className" ? St(t, n) : r && !o && !l ? t[Tt(e)] = n : t[
|
|
359
|
+
e === "class" || e === "className" ? St(t, n) : r && !o && !l ? t[Tt(e)] = n : t[a || e] = n;
|
|
360
360
|
} else {
|
|
361
361
|
const u = s && e.indexOf(":") > -1 && gt[e.split(":")[0]];
|
|
362
362
|
u ? xt(t, u, e, n) : z(t, ut[e] || e, n);
|
|
@@ -389,8 +389,8 @@ function A(t, e, n, i, s) {
|
|
|
389
389
|
!n && (n = [...t.childNodes]);
|
|
390
390
|
let o = [];
|
|
391
391
|
for (let l = 0; l < n.length; l++) {
|
|
392
|
-
const
|
|
393
|
-
|
|
392
|
+
const a = n[l];
|
|
393
|
+
a.nodeType === 8 && a.data.slice(0, 2) === "!$" ? a.remove() : o.push(a);
|
|
394
394
|
}
|
|
395
395
|
n = o;
|
|
396
396
|
}
|
|
@@ -428,16 +428,16 @@ function A(t, e, n, i, s) {
|
|
|
428
428
|
return n;
|
|
429
429
|
if (i === void 0)
|
|
430
430
|
return [...t.childNodes];
|
|
431
|
-
let
|
|
432
|
-
for (; (
|
|
433
|
-
|
|
434
|
-
return n =
|
|
431
|
+
let a = o[0], f = [a];
|
|
432
|
+
for (; (a = a.nextSibling) !== i; )
|
|
433
|
+
f.push(a);
|
|
434
|
+
return n = f;
|
|
435
435
|
}
|
|
436
436
|
if (o.length === 0) {
|
|
437
437
|
if (n = j(t, n, i), r)
|
|
438
438
|
return n;
|
|
439
439
|
} else
|
|
440
|
-
l ? n.length === 0 ? H(t, o, i) :
|
|
440
|
+
l ? n.length === 0 ? H(t, o, i) : bt(t, n, o) : (n && j(t), H(t, o));
|
|
441
441
|
n = o;
|
|
442
442
|
} else if (e.nodeType) {
|
|
443
443
|
if (d.context && e.parentNode)
|
|
@@ -456,13 +456,13 @@ function A(t, e, n, i, s) {
|
|
|
456
456
|
function N(t, e, n, i) {
|
|
457
457
|
let s = !1;
|
|
458
458
|
for (let c = 0, r = e.length; c < r; c++) {
|
|
459
|
-
let o = e[c], l = n && n[t.length],
|
|
459
|
+
let o = e[c], l = n && n[t.length], a;
|
|
460
460
|
if (!(o == null || o === !0 || o === !1))
|
|
461
|
-
if ((
|
|
461
|
+
if ((a = typeof o) == "object" && o.nodeType)
|
|
462
462
|
t.push(o);
|
|
463
463
|
else if (Array.isArray(o))
|
|
464
464
|
s = N(t, o, l) || s;
|
|
465
|
-
else if (
|
|
465
|
+
else if (a === "function")
|
|
466
466
|
if (i) {
|
|
467
467
|
for (; typeof o == "function"; )
|
|
468
468
|
o = o();
|
|
@@ -474,8 +474,8 @@ function N(t, e, n, i) {
|
|
|
474
474
|
} else
|
|
475
475
|
t.push(o), s = !0;
|
|
476
476
|
else {
|
|
477
|
-
const
|
|
478
|
-
l && l.nodeType === 3 && l.data ===
|
|
477
|
+
const f = String(o);
|
|
478
|
+
l && l.nodeType === 3 && l.data === f ? t.push(l) : t.push(document.createTextNode(f));
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
return s;
|
|
@@ -594,7 +594,7 @@ const {
|
|
|
594
594
|
size13: ce,
|
|
595
595
|
size14: re,
|
|
596
596
|
size15: le
|
|
597
|
-
} = st,
|
|
597
|
+
} = st, ae = {
|
|
598
598
|
size000: Ut,
|
|
599
599
|
size00: qt,
|
|
600
600
|
size1: Qt,
|
|
@@ -612,7 +612,7 @@ const {
|
|
|
612
612
|
size13: ce,
|
|
613
613
|
size14: re,
|
|
614
614
|
size15: le
|
|
615
|
-
},
|
|
615
|
+
}, fe = {
|
|
616
616
|
sizeXxs: Nt,
|
|
617
617
|
sizeXs: kt,
|
|
618
618
|
sizeSm: Lt,
|
|
@@ -626,7 +626,7 @@ const {
|
|
|
626
626
|
sizeHeader1: Ft,
|
|
627
627
|
sizeHeader2: Vt,
|
|
628
628
|
sizeHeader3: Xt
|
|
629
|
-
}, ue =
|
|
629
|
+
}, ue = ae, de = fe;
|
|
630
630
|
function et(t) {
|
|
631
631
|
return t.reduce((e, [n, i]) => ({
|
|
632
632
|
...e,
|
|
@@ -635,9 +635,9 @@ function et(t) {
|
|
|
635
635
|
}
|
|
636
636
|
function _(t, e) {
|
|
637
637
|
if (e !== void 0)
|
|
638
|
-
return typeof e == "number" && e >= 0 ? `${e}px` : typeof e == "string" && W(e) ? tt(e) ? `var(${e})` : e : C(
|
|
638
|
+
return typeof e == "number" && e >= 0 ? `${e}px` : typeof e == "string" && W(e) ? tt(e) ? `var(${e})` : e : C($(t, e));
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function $(t, e) {
|
|
641
641
|
const n = t.space ?? ue, i = et(Object.entries(n).map(([s, c]) => [s, typeof c == "number" ? `${c}px` : c]));
|
|
642
642
|
return C(i[e]);
|
|
643
643
|
}
|
|
@@ -655,7 +655,7 @@ function ye(t) {
|
|
|
655
655
|
return t === void 0 ? "100%" : typeof t == "number" ? `${t}px` : t;
|
|
656
656
|
}
|
|
657
657
|
function Be(t) {
|
|
658
|
-
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l,
|
|
658
|
+
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l, a]) => o + `${l}:${a};`, ""), n = () => `--maxWidth: ${ye(t.maxWidth)};`, i = () => t.centerText ? "center-text" : "", s = () => t.centerChildren ? "center-children" : "", c = () => [i(), s()].filter(Boolean).join(" "), r = () => [e(), n()].join("; ");
|
|
659
659
|
return h(() => t.as ?? "div", y(m(t, ["as", "maxWidth", "centerText", "centerChildren"]), g({
|
|
660
660
|
style: r,
|
|
661
661
|
"data-bedrock-center": c
|
|
@@ -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,
|
|
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("; ");
|
|
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
|
|
@@ -698,11 +698,11 @@ function Ge(t, e) {
|
|
|
698
698
|
return;
|
|
699
699
|
e && e(s());
|
|
700
700
|
const r = Y(s(), (o) => {
|
|
701
|
-
var
|
|
702
|
-
const l = ((
|
|
701
|
+
var a;
|
|
702
|
+
const l = ((a = o.borderBoxSize) == null ? void 0 : a.inlineSize) ?? o.contentRect.width;
|
|
703
703
|
if (l > 0) {
|
|
704
|
-
const
|
|
705
|
-
i(
|
|
704
|
+
const f = l <= t;
|
|
705
|
+
i(f);
|
|
706
706
|
}
|
|
707
707
|
});
|
|
708
708
|
q(r);
|
|
@@ -714,18 +714,18 @@ function he(t) {
|
|
|
714
714
|
function ge(t) {
|
|
715
715
|
return Array.isArray(t) ? t.join("/") : t;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function be(t) {
|
|
718
718
|
return he(t) ? ge(t) : void 0;
|
|
719
719
|
}
|
|
720
720
|
function He(t) {
|
|
721
|
-
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [o, l]) => r + `${o}:${l};`, ""), n = () =>
|
|
721
|
+
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [o, l]) => r + `${o}:${l};`, ""), n = () => be(t.ratio), i = () => n() ? `--ratio: ${n()}` : "", s = () => typeof t.position == "string" ? `--position: ${t.position}` : "50%", c = () => [e(), i(), s()].join("; ");
|
|
722
722
|
return h(() => t.as ?? "div", y(m(t, ["as", "ratio", "position"]), g({
|
|
723
723
|
style: c,
|
|
724
724
|
"data-bedrock-frame": () => ""
|
|
725
725
|
})));
|
|
726
726
|
}
|
|
727
|
-
function
|
|
728
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [o, l]) => r + `${o}:${l};`, ""), i = () => `--gutter: ${
|
|
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("; ");
|
|
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" : ""
|
|
@@ -800,7 +800,7 @@ const M = 1, we = typeof window == "object" && typeof document == "object" && do
|
|
|
800
800
|
target: l
|
|
801
801
|
}) => {
|
|
802
802
|
n(1);
|
|
803
|
-
const
|
|
803
|
+
const a = t.gutter ? $(c, t.gutter) ?? "1px" : "1px", f = we ? B(a, l) : void 0, u = Math.max(f ?? M, M), [b] = Array.from(l.children), S = 1 + Math.min(l.scrollHeight, b.scrollHeight), P = Math.max(Math.ceil(S / u), M);
|
|
804
804
|
return n(P), 0;
|
|
805
805
|
});
|
|
806
806
|
return q(o), 0;
|
|
@@ -815,7 +815,7 @@ const M = 1, we = typeof window == "object" && typeof document == "object" && do
|
|
|
815
815
|
},
|
|
816
816
|
children: s
|
|
817
817
|
}));
|
|
818
|
-
return I(
|
|
818
|
+
return I($e, y({
|
|
819
819
|
style: "grid-template-rows: 1px;"
|
|
820
820
|
}, t, {
|
|
821
821
|
children: i
|
|
@@ -823,7 +823,9 @@ const M = 1, we = typeof window == "object" && typeof document == "object" && do
|
|
|
823
823
|
}, Ae = {
|
|
824
824
|
start: "justify:start",
|
|
825
825
|
end: "justify:end",
|
|
826
|
-
center: "justify:center"
|
|
826
|
+
center: "justify:center",
|
|
827
|
+
"space-between": "justify:space-between",
|
|
828
|
+
"space-around": "justify:space-around"
|
|
827
829
|
}, Ce = {
|
|
828
830
|
start: "align:start",
|
|
829
831
|
end: "align:end",
|
|
@@ -831,7 +833,7 @@ const M = 1, we = typeof window == "object" && typeof document == "object" && do
|
|
|
831
833
|
stretch: "align:stretch"
|
|
832
834
|
};
|
|
833
835
|
function Fe(t) {
|
|
834
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [
|
|
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(" ");
|
|
835
837
|
return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "justify", "align"]), g({
|
|
836
838
|
style: r,
|
|
837
839
|
"data-bedrock-inline-cluster": o
|
|
@@ -840,7 +842,9 @@ function Fe(t) {
|
|
|
840
842
|
const Ee = {
|
|
841
843
|
start: "justify:start",
|
|
842
844
|
end: "justify:end",
|
|
843
|
-
center: "justify:center"
|
|
845
|
+
center: "justify:center",
|
|
846
|
+
"space-between": "justify:space-between",
|
|
847
|
+
"space-around": "justify:space-around"
|
|
844
848
|
}, Ie = {
|
|
845
849
|
start: "align:start",
|
|
846
850
|
end: "align:end",
|
|
@@ -848,10 +852,10 @@ const Ee = {
|
|
|
848
852
|
stretch: "align:stretch"
|
|
849
853
|
};
|
|
850
854
|
function Ve(t) {
|
|
851
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((u, [
|
|
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(" ");
|
|
852
856
|
return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "justify", "align", "stretch", "switchAt"]), g({
|
|
853
|
-
style:
|
|
854
|
-
"data-bedrock-inline":
|
|
857
|
+
style: a,
|
|
858
|
+
"data-bedrock-inline": f
|
|
855
859
|
})));
|
|
856
860
|
}
|
|
857
861
|
const Te = (t) => ({
|
|
@@ -884,7 +888,7 @@ function Xe(t) {
|
|
|
884
888
|
})));
|
|
885
889
|
}
|
|
886
890
|
function Ue(t) {
|
|
887
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [o, l]) => r + `${o}:${l};`, ""), i = () => `--gutter: ${
|
|
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 = () => {
|
|
888
892
|
switch (t.snapType) {
|
|
889
893
|
case "none":
|
|
890
894
|
return "snapType:none";
|
|
@@ -911,7 +915,7 @@ const F = {
|
|
|
911
915
|
"auto-end": "fraction:auto-end"
|
|
912
916
|
};
|
|
913
917
|
function qe(t) {
|
|
914
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [
|
|
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("; ");
|
|
915
919
|
return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "fraction"]), g({
|
|
916
920
|
style: o,
|
|
917
921
|
"data-bedrock-split": c
|
|
@@ -924,7 +928,7 @@ const Oe = {
|
|
|
924
928
|
stretch: "align:stretch"
|
|
925
929
|
};
|
|
926
930
|
function Qe(t) {
|
|
927
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l,
|
|
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(" ");
|
|
928
932
|
return h(() => t.as ?? "div", y(m(t, ["as", "gutter"]), g({
|
|
929
933
|
style: s,
|
|
930
934
|
"data-bedrock-stack": r
|
|
@@ -935,7 +939,7 @@ function Me(t) {
|
|
|
935
939
|
return typeof t == "number" ? `${t}px` : t && W(t) ? t : "100vh";
|
|
936
940
|
}
|
|
937
941
|
function ze(t) {
|
|
938
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l,
|
|
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("; ");
|
|
939
943
|
return h(() => t.as ?? "div", y(m(t, ["as", "minHeight", "stretchContent"]), g({
|
|
940
944
|
style: r,
|
|
941
945
|
"data-bedrock-cover": c
|
|
@@ -953,7 +957,7 @@ function Ye(t) {
|
|
|
953
957
|
}));
|
|
954
958
|
}
|
|
955
959
|
function Je(t) {
|
|
956
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [l,
|
|
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("; ");
|
|
957
961
|
return h(() => t.as ?? "div", y(m(t, ["as", "gutter", "columns", "colCount", "switchAt"]), g({
|
|
958
962
|
style: r,
|
|
959
963
|
"data-bedrock-columns": () => ""
|
|
@@ -974,7 +978,7 @@ export {
|
|
|
974
978
|
Je as Columns,
|
|
975
979
|
Ye as Cover,
|
|
976
980
|
He as Frame,
|
|
977
|
-
|
|
981
|
+
$e as Grid,
|
|
978
982
|
Ve as Inline,
|
|
979
983
|
Fe as InlineCluster,
|
|
980
984
|
_e as MasonryGrid,
|
|
@@ -987,7 +991,7 @@ export {
|
|
|
987
991
|
Ge as createContainerQuery,
|
|
988
992
|
_ as getSafeGutter,
|
|
989
993
|
O as getSizeValue,
|
|
990
|
-
|
|
994
|
+
$ as getSpacingValue,
|
|
991
995
|
de as sizes,
|
|
992
996
|
ue as spacing,
|
|
993
997
|
x as useTheme
|
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 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(()=>ye(e,t,n,!0,r,!0)),r}function me(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 ye(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 m(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(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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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,mt=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 me(r,s),D(s,()=>e.children),a.createRenderEffect(c=>R(s,`grid-row: span ${t()};`,c)),s})()},yt=e=>{const t=a.children(()=>e.children),i=[].concat(t()).filter(Boolean).map(r=>a.createComponent(mt,{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"},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 y(()=>e.as??"div",a.mergeProps(m(e,["as","gutter","justify","align"]),h({style:s,"data-bedrock-inline-cluster":c})))}const Ct={start:"justify:start",end:"justify:end",center:"justify:center"},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.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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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 y(()=>e.as??"div",a.mergeProps(m(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=yt,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 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"})});
|
package/lib/inline-cluster.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ declare const justifyMap: {
|
|
|
5
5
|
readonly start: "justify:start";
|
|
6
6
|
readonly end: "justify:end";
|
|
7
7
|
readonly center: "justify:center";
|
|
8
|
+
readonly "space-between": "justify:space-between";
|
|
9
|
+
readonly "space-around": "justify:space-around";
|
|
8
10
|
};
|
|
9
11
|
declare const alignMap: {
|
|
10
12
|
readonly start: "align:start";
|
package/lib/inline.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ declare const justifyMap: {
|
|
|
7
7
|
readonly start: "justify:start";
|
|
8
8
|
readonly end: "justify:end";
|
|
9
9
|
readonly center: "justify:center";
|
|
10
|
+
readonly "space-between": "justify:space-between";
|
|
11
|
+
readonly "space-around": "justify:space-around";
|
|
10
12
|
};
|
|
11
13
|
declare const alignMap: {
|
|
12
14
|
readonly start: "align:start";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bedrock-layout/solid",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.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": "
|
|
74
|
+
"gitHead": "1336d37e8ab340160904502007320a5b5a2b841c"
|
|
75
75
|
}
|