@bedrock-layout/solid 1.6.0 → 1.7.1
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/cover.d.ts +5 -0
- package/lib/index.cjs.js +1 -1
- package/lib/index.m.js +236 -232
- package/lib/index.umd.js +1 -1
- package/package.json +3 -3
package/lib/cover.d.ts
CHANGED
|
@@ -9,7 +9,12 @@ interface CoverWrapperBaseProps {
|
|
|
9
9
|
gutter?: SpacingOptions;
|
|
10
10
|
gap?: SpacingOptions;
|
|
11
11
|
minHeight?: MinHeight;
|
|
12
|
+
/**
|
|
13
|
+
* Sets the content to stretch to the full height of the cover component minus the top and bottom slots.
|
|
14
|
+
* @deprecated Use `variant` set to `stretch-content` instead.
|
|
15
|
+
*/
|
|
12
16
|
stretchContent?: boolean;
|
|
17
|
+
variant?: "default" | "stretch-content";
|
|
13
18
|
}
|
|
14
19
|
export type CoverWrapperProps<T extends ValidConstructor = "div"> = HeadlessPropsWithRef<T, CoverWrapperBaseProps>;
|
|
15
20
|
export interface CoverProps {
|
package/lib/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("open-props"),a=require("solid-js"),P=require("@bedrock-layout/register-resize-callback"),Z=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],K=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Z]),p=new Set(["innerHTML","textContent","innerText","children"]),ee=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),te=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function ne(e,t){const n=te[e];return typeof n=="object"?n[t]?n.$:void 0:n}const ie=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),se=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),oe={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function re(e,t,n){let i=n.length,s=t.length,r=i,c=0,o=0,l=t[s-1].nextSibling,f=null;for(;c<s||o<r;){if(t[c]===n[o]){c++,o++;continue}for(;t[s-1]===n[r-1];)s--,r--;if(s===c){const d=r<i?o?n[o-1].nextSibling:n[r-o]:l;for(;o<r;)e.insertBefore(n[o++],d)}else if(r===o)for(;c<s;)(!f||!f.has(t[c]))&&t[c].remove(),c++;else if(t[c]===n[r-1]&&n[o]===t[s-1]){const d=t[--s].nextSibling;e.insertBefore(n[o++],t[c++].nextSibling),e.insertBefore(n[--r],d),t[s]=n[r]}else{if(!f){f=new Map;let u=o;for(;u<r;)f.set(n[u],u++)}const d=f.get(t[c]);if(d!=null)if(o<d&&d<r){let u=c,h=1,C;for(;++u<s&&u<r&&!((C=f.get(t[u]))==null||C!==d+h);)h++;if(h>d-o){const I=t[c];for(;o<d;)e.insertBefore(n[o++],I)}else e.replaceChild(n[o++],t[c++])}else c++;else t[c++].remove()}}}const N="_$DX_DELEGATE";function D(e,t,n){let i;const s=()=>{const c=document.createElement("template");return c.innerHTML=e,n?c.content.firstChild.firstChild:c.content.firstChild},r=t?()=>a.untrack(()=>document.importNode(i||(i=s()),!0)):()=>(i||(i=s())).cloneNode(!0);return r.cloneNode=r,r}function ce(e,t=window.document){const n=t[N]||(t[N]=new Set);for(let i=0,s=e.length;i<s;i++){const r=e[i];n.has(r)||(n.add(r),t.addEventListener(r,be))}}function T(e,t,n){a.sharedConfig.context||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function ae(e,t,n,i){a.sharedConfig.context||(i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i))}function le(e,t){a.sharedConfig.context||(t==null?e.removeAttribute("class"):e.className=t)}function fe(e,t,n,i){if(i)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const s=n[0];e.addEventListener(t,n[0]=r=>s.call(e,n[1],r))}else e.addEventListener(t,n)}function de(e,t,n={}){const i=Object.keys(t||{}),s=Object.keys(n);let r,c;for(r=0,c=s.length;r<c;r++){const o=s[r];!o||o==="undefined"||t[o]||(L(e,o,!1),delete n[o])}for(r=0,c=i.length;r<c;r++){const o=i[r],l=!!t[o];!o||o==="undefined"||n[o]===l||!l||(L(e,o,!0),n[o]=l)}return n}function G(e,t,n){if(!t)return n?T(e,"style"):t;const i=e.style;if(typeof t=="string")return i.cssText=t;typeof n=="string"&&(i.cssText=n=void 0),n||(n={}),t||(t={});let s,r;for(r in n)t[r]==null&&i.removeProperty(r),delete n[r];for(r in t)s=t[r],s!==n[r]&&(i.setProperty(r,s),n[r]=s);return n}function ue(e,t={},n,i){const s={};return i||a.createRenderEffect(()=>s.children=x(e,t.children,s.children)),a.createRenderEffect(()=>t.ref&&t.ref(e)),a.createRenderEffect(()=>ye(e,t,n,!0,s,!0)),s}function ge(e,t,n){return a.untrack(()=>e(t,n))}function H(e,t,n,i){if(n!==void 0&&!i&&(i=[]),typeof t!="function")return x(e,t,i,n);a.createRenderEffect(s=>x(e,t(),s,n),i)}function ye(e,t,n,i,s={},r=!1){t||(t={});for(const c in s)if(!(c in t)){if(c==="children")continue;s[c]=R(e,c,null,s[c],n,r)}for(const c in t){if(c==="children"){i||x(e,t.children);continue}const o=t[c];s[c]=R(e,c,o,s[c],n,r)}}function me(e){let t,n;return!a.sharedConfig.context||!(t=a.sharedConfig.registry.get(n=$e()))?e():(a.sharedConfig.completed&&a.sharedConfig.completed.add(t),a.sharedConfig.registry.delete(n),t)}function he(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function L(e,t,n){const i=t.trim().split(/\s+/);for(let s=0,r=i.length;s<r;s++)e.classList.toggle(i[s],n)}function R(e,t,n,i,s,r){let c,o,l,f,d;if(t==="style")return G(e,n,i);if(t==="classList")return de(e,n,i);if(n===i)return i;if(t==="ref")r||n(e);else if(t.slice(0,3)==="on:"){const u=t.slice(3);i&&e.removeEventListener(u,i),n&&e.addEventListener(u,n)}else if(t.slice(0,10)==="oncapture:"){const u=t.slice(10);i&&e.removeEventListener(u,i,!0),n&&e.addEventListener(u,n,!0)}else if(t.slice(0,2)==="on"){const u=t.slice(2).toLowerCase(),h=ie.has(u);if(!h&&i){const C=Array.isArray(i)?i[0]:i;e.removeEventListener(u,C)}(h||n)&&(fe(e,u,n,h),h&&ce([u]))}else if(t.slice(0,5)==="attr:")T(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(l=p.has(t))||!s&&((f=ne(t,e.tagName))||(o=K.has(t)))||(c=e.nodeName.includes("-"))){if(d)t=t.slice(5),o=!0;else if(a.sharedConfig.context)return n;t==="class"||t==="className"?le(e,n):c&&!o&&!l?e[he(t)]=n:e[f||t]=n}else{const u=s&&t.indexOf(":")>-1&&oe[t.split(":")[0]];u?ae(e,u,t,n):T(e,ee[t]||t,n)}return n}function be(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),a.sharedConfig.registry&&!a.sharedConfig.done&&(a.sharedConfig.done=_$HY.done=!0);n;){const i=n[t];if(i&&!n.disabled){const s=n[`${t}Data`];if(s!==void 0?i.call(n,s,e):i.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function x(e,t,n,i,s){if(a.sharedConfig.context){!n&&(n=[...e.childNodes]);let o=[];for(let l=0;l<n.length;l++){const f=n[l];f.nodeType===8&&f.data.slice(0,2)==="!$"?f.remove():o.push(f)}n=o}for(;typeof n=="function";)n=n();if(t===n)return n;const r=typeof t,c=i!==void 0;if(e=c&&n[0]&&n[0].parentNode||e,r==="string"||r==="number"){if(a.sharedConfig.context)return n;if(r==="number"&&(t=t.toString()),c){let o=n[0];o&&o.nodeType===3?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=S(e,n,i,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||r==="boolean"){if(a.sharedConfig.context)return n;n=S(e,n,i)}else{if(r==="function")return a.createRenderEffect(()=>{let o=t();for(;typeof o=="function";)o=o();n=x(e,o,n,i)}),()=>n;if(Array.isArray(t)){const o=[],l=n&&Array.isArray(n);if(v(o,t,n,s))return a.createRenderEffect(()=>n=x(e,o,n,i,!0)),()=>n;if(a.sharedConfig.context){if(!o.length)return n;if(i===void 0)return[...e.childNodes];let f=o[0],d=[f];for(;(f=f.nextSibling)!==i;)d.push(f);return n=d}if(o.length===0){if(n=S(e,n,i),c)return n}else l?n.length===0?W(e,o,i):re(e,n,o):(n&&S(e),W(e,o));n=o}else if(t.nodeType){if(a.sharedConfig.context&&t.parentNode)return n=c?[t]:t;if(Array.isArray(n)){if(c)return n=S(e,n,i,t);S(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function v(e,t,n,i){let s=!1;for(let r=0,c=t.length;r<c;r++){let o=t[r],l=n&&n[e.length],f;if(!(o==null||o===!0||o===!1))if((f=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))s=v(e,o,l)||s;else if(f==="function")if(i){for(;typeof o=="function";)o=o();s=v(e,Array.isArray(o)?o:[o],Array.isArray(l)?l:[l])||s}else e.push(o),s=!0;else{const d=String(o);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d))}}return s}function W(e,t,n=null){for(let i=0,s=t.length;i<s;i++)e.insertBefore(t[i],n)}function S(e,t,n,i){if(n===void 0)return e.textContent="";const s=i||document.createTextNode("");if(t.length){let r=!1;for(let c=t.length-1;c>=0;c--){const o=t[c];if(s!==o){const l=o.parentNode===e;!r&&!c?l?e.replaceChild(s,o):e.insertBefore(s,n):l&&o.remove()}else r=!0}}else e.insertBefore(s,n);return[s]}function $e(){const e=a.sharedConfig.context;return`${e.id}${e.count++}`}const Ce="http://www.w3.org/2000/svg";function Se(e,t=!1){return t?document.createElementNS(Ce,e):document.createElement(e)}function xe(e){const[t,n]=a.splitProps(e,["component"]),i=a.createMemo(()=>t.component);return a.createMemo(()=>{const s=i();switch(typeof s){case"function":return a.untrack(()=>s(n));case"string":const r=se.has(s),c=a.sharedConfig.context?me():Se(s,r);return ue(c,n,r),c}})}function w(e){return e??void 0}function g(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,i)=>Object.defineProperty({...n},i,{get(){return e[i]},configurable:!0,enumerable:!0}),{})}function y(e,t){return a.createComponent(xe,a.mergeProps({get component(){return e()}},t))}function m(e){return Object.values(e).every(t=>typeof t=="function")?Object.keys(e).reduce((t,n)=>{const i=e[n];return Object.defineProperty(t,n,{get(){return i()},configurable:!0,enumerable:!0})},{}):new Error("Please provide an object with accessor values only.")}const _=/^--\D{1}.{0,100}$/;function F(e){return _.test(e)}function E(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1}.{0,100}\)$/,_].some(t=>t.test(e))}const{sizeXxs:we,sizeXs:je,sizeSm:Ae,sizeMd:Pe,sizeLg:Ee,sizeXl:Ie,sizeXxl:Me,sizeContent1:Te,sizeContent2:ve,sizeContent3:Oe,sizeHeader1:ze,sizeHeader2:ke,sizeHeader3:Ne,size000:Le,size00:Re,size1:We,size2:Be,size3:De,size4:Ge,size5:He,size6:_e,size7:Fe,size8:Ve,size9:Xe,size10:qe,size11:Ue,size12:Qe,size13:Je,size14:Ye,size15:Ze}=Y,Ke={size000:Le,size00:Re,size1:We,size2:Be,size3:De,size4:Ge,size5:He,size6:_e,size7:Fe,size8:Ve,size9:Xe,size10:qe,size11:Ue,size12:Qe,size13:Je,size14:Ye,size15:Ze},pe={sizeXxs:we,sizeXs:je,sizeSm:Ae,sizeMd:Pe,sizeLg:Ee,sizeXl:Ie,sizeXxl:Me,sizeContent1:Te,sizeContent2:ve,sizeContent3:Oe,sizeHeader1:ze,sizeHeader2:ke,sizeHeader3:Ne},V=Ke,X=pe;function q(e){return e.reduce((t,[n,i])=>({...t,[n]:i}),{})}function O(e,t){if(t!==void 0)return typeof t=="number"&&t>=0?`${t}px`:typeof t=="string"&&E(t)?F(t)?`var(${t})`:t:w(b(e,t))}function b(e,t){const n=e.space??V,i=q(Object.entries(n).map(([s,r])=>[s,typeof r=="number"?`${r}px`:r]));return w(i[t])}function A(e,t){if(t===void 0)return;if(typeof t=="number"&&t>=0)return`${t}px`;if(typeof t=="string"&&E(t))return F(t)?`var(${t})`:t;const n=e.sizes??X,i=q(Object.entries(n).map(([s,r])=>[s,typeof r=="number"?`${r}px`:r]));return w(i[t])}function et(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}function tt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),n=()=>`--maxWidth: ${et(e.maxWidth)};`,i=()=>e.centerText?"center-text":"",s=()=>e.centerChildren?"center-children":"",r=()=>[i(),s()].filter(Boolean).join(" "),c=()=>[t(),n()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","maxWidth","centerText","centerChildren"]),m({style:c,"data-bedrock-center":r})))}const U=a.createContext({});function nt(e){return a.createComponent(U.Provider,{get value(){return e.theme},get children(){return e.children}})}function $(){try{return a.useContext(U)}catch{return{}}}function it(e,t){return A(e,t)}function st(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--minItemWidth: ${it(t,e.minItemWidth)}`,r=()=>e.noStretchedColumns===!0?"no-stretched-columns":"",c=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","minItemWidth","noStretchedColumns"]),m({style:c,"data-bedrock-column-drop":r})))}function ot(e,t){const[n,i]=a.createSignal(!1),[s,r]=a.createSignal();return a.onMount(()=>{P.init()}),a.createEffect(()=>{if(w(s())===void 0)return;t&&t(s());const c=P.registerCallback(s(),o=>{var f;const l=((f=o.borderBoxSize)==null?void 0:f.inlineSize)??o.contentRect.width;if(l>0){const d=l<=e;i(d)}});a.onCleanup(c)}),[n,r]}function rt(e){return Array.isArray(e)&&e.length===2&&e.every(Number.isFinite)||typeof e=="string"&&/^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e)}function ct(e){return Array.isArray(e)?e.join("/"):e}function at(e){return rt(e)?ct(e):void 0}function lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,l])=>c+`${o}:${l};`,""),n=()=>at(e.ratio),i=()=>n()?`--ratio: ${n()}`:"",s=()=>typeof e.position=="string"?`--position: ${e.position}`:"50%",r=()=>[t(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","ratio","position"]),m({style:r,"data-bedrock-frame":()=>""})))}function Q(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,l])=>c+`${o}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth??0}px`};`,r=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","minItemWidth"]),m({style:r,"data-bedrock-grid":()=>e.variant==="masonry"?"variant:masonry":""})))}const j=96;function J(e){const t=String(e),n=parseFloat(t),[,i]=t.match(/[\d.\-+]*\s*(.*)/)??["",""];return[n,i]}function k(e,t){if(!e)return;const n=t??document.body,i=(e??"px").trim().toLowerCase();switch(i){case"vmin":case"vmax":case"vh":case"vw":case"%":return;case"ch":case"ex":return ft(i,n);case"em":return z(n,"font-size");case"rem":return z(document.body,"font-size");case"in":return j;case"cm":return j/2.54;case"mm":return j/25.4;case"pt":return j/72;case"pc":return j/6;case"px":return 1;default:{const[s,r]=J(i);if(isNaN(s))return;if(!r)return s;const c=k(r,t);return typeof c=="number"?s*c:void 0}}}function z(e,t){const[n,i]=J(getComputedStyle(e).getPropertyValue(t));return n*(k(i,e)??1)}function ft(e,t){const n=document.createElement("div");n.style.height="128"+e,t.appendChild(n);const i=z(n,"height")/128;return t.removeChild(n),i}var dt=D("<div>");const M=1,ut=typeof window=="object"&&typeof document=="object"&&document.nodeType===9,gt=e=>{const[t,n]=a.createSignal(1),[i,s]=a.createSignal(),r=$();return a.onMount(()=>(P.init(),0)),a.createEffect(()=>{const c=w(i());if(c===void 0)return;const o=P.registerCallback(c,({target:l})=>{n(1);const f=e.gutter?b(r,e.gutter)??"1px":"1px",d=ut?k(f,l):void 0,u=Math.max(d??M,M),[h]=Array.from(l.children),C=1+Math.min(l.scrollHeight,h.scrollHeight),I=Math.max(Math.ceil(C/u),M);return n(I),0});return a.onCleanup(o),0}),(()=>{var c=dt();return ge(s,c),H(c,()=>e.children),a.createRenderEffect(o=>G(c,`grid-row: span ${t()};`,o)),c})()},yt=e=>{const t=a.children(()=>e.children),i=[].concat(t()).filter(Boolean).map(s=>a.createComponent(gt,{get gutter(){return e.gutter},children:s}));return a.createComponent(Q,a.mergeProps({style:"grid-template-rows: 1px;"},e,{children:i}))},mt={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},ht={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function bt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((l,[f,d])=>l+`${f}:${d};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>e.justify!==void 0?mt[e.justify]:void 0,r=()=>e.align!==void 0?ht[e.align]:void 0,c=()=>[n(),i()].join("; "),o=()=>[s(),r()].filter(Boolean).join(" ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","justify","align"]),m({style:c,"data-bedrock-inline-cluster":o})))}const $t={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},Ct={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function St(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((u,[h,C])=>u+`${h}:${C};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,r=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",c=()=>e.justify!==void 0?$t[e.justify]:void 0,o=()=>e.align!==void 0?Ct[e.align]:void 0,l=()=>e.stretch?`stretch:${e.stretch}`:void 0,f=()=>[n(),i(),r(),s()].join("; "),d=()=>[c(),o(),l()].filter(Boolean).join(" ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","justify","align","stretch","switchAt"]),m({style:f,"data-bedrock-inline":d})))}const xt=e=>({left:"padding-inline-start",right:"padding-inline-end",top:"padding-block-start",bottom:"padding-block-end",inlineStart:"padding-inline-start",inlineEnd:"padding-inline-end",blockStart:"padding-block-start",blockEnd:"padding-block-end"})[e],wt=(e,t)=>{if(!t)return"";if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((i,[s,r])=>({...i,[xt(s)]:O(e,r)??"0px"}),{}):{padding:Array.from(Array.isArray(t)?t:[t]).map(i=>O(e,i)??"0px").join(" ")};return Object.entries(n).reduce((i,[s,r])=>i+`${s}:${r};`,"")};function jt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((r,[c,o])=>r+`${c}:${o};`,""),i=()=>wt(t,e.padding),s=()=>[n(),i()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","padding"]),m({style:s,"data-bedrock-padbox":()=>""})))}function At(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,l])=>c+`${o}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>{switch(e.snapType){case"none":return"snapType:none";case"proximity":return"snapType:proximity";case"mandatory":return"snapType:mandatory";default:return"snapType:none"}},r=()=>[n(),i()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter"]),m({style:r,"data-bedrock-reel":s})))}const B={"1/4":"fraction:1/4","1/3":"fraction:1/3","1/2":"fraction:1/2","2/3":"fraction:2/3","3/4":"fraction:3/4","auto-start":"fraction:auto-start","auto-end":"fraction:auto-end"};function Pt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((l,[f,d])=>l+`${f}:${d};`,""),i=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",s=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>B[e.fraction??"1/2"]??B["1/2"],c=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,o=()=>[n(),s(),i(),c()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","fraction"]),m({style:o,"data-bedrock-split":r})))}const Et={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function It(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>[n(),i()].join("; "),r=()=>e.align!==void 0?Et[e.align]:void 0,c=()=>[r()].filter(Boolean).join(" ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter"]),m({style:s,"data-bedrock-stack":c})))}var Mt=D("<div data-bedrock-cover-centered>");function Tt(e){return typeof e=="number"?`${e}px`:e&&E(e)?e:"100vh"}function vt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--minHeight: ${Tt(e.minHeight)};`,r=()=>e.stretchContent===!0?"stretch-content":"",c=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","minHeight","stretchContent"]),m({style:c,"data-bedrock-cover":r})))}function Ot(e){const[t,n]=a.splitProps(e,["children","top","bottom"]);return a.createComponent(vt,a.mergeProps(n,{get children(){return[a.createMemo(()=>t.top),(()=>{var i=Mt();return H(i,()=>t.children),i})(),a.createMemo(()=>t.bottom)]}}))}function zt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[l,f])=>o+`${l}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--columns: ${w(Math.max(e.colCount??e.columns??1,1))??1};`,r=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",c=()=>[n(),i(),s(),r()].filter(Boolean).join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","gutter","columns","colCount","switchAt"]),m({style:c,"data-bedrock-columns":()=>""})))}const kt=e=>typeof e=="number"?e:1;function Nt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[o,l])=>c+`${o}:${l};`,""),n=()=>`--span: ${kt(e.span)};`,i=()=>e.offsetStart&&e.offsetStart>0?`--offsetStart: ${e.offsetStart};`:"",s=()=>e.offsetEnd&&e.offsetEnd>0?`--offsetEnd: ${e.offsetEnd};`:"",r=()=>[t(),n(),i(),s()].join("; ");return y(()=>e.as??"div",a.mergeProps(g(e,["as","span","offsetStart","offsetEnd"]),m({style:r,"data-bedrock-column":()=>""})))}exports.Center=tt;exports.Column=Nt;exports.ColumnDrop=st;exports.Columns=zt;exports.Cover=Ot;exports.Frame=lt;exports.Grid=Q;exports.Inline=St;exports.InlineCluster=bt;exports.MasonryGrid=yt;exports.PadBox=jt;exports.Reel=At;exports.Split=Pt;exports.Stack=It;exports.ThemeProvider=nt;exports.checkIsCSSLength=E;exports.createContainerQuery=ot;exports.getSafeGutter=O;exports.getSizeValue=A;exports.getSpacingValue=b;exports.sizes=X;exports.spacing=V;exports.useTheme=$;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("open-props"),l=require("solid-js"),P=require("@bedrock-layout/register-resize-callback"),K=["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"],p=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...K]),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 se=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),oe=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","feDropShadow","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"]),re={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function ce(e,t,n){let i=n.length,s=t.length,o=i,c=0,r=0,a=t[s-1].nextSibling,f=null;for(;c<s||r<o;){if(t[c]===n[r]){c++,r++;continue}for(;t[s-1]===n[o-1];)s--,o--;if(s===c){const d=o<i?r?n[r-1].nextSibling:n[o-r]:a;for(;r<o;)e.insertBefore(n[r++],d)}else if(o===r)for(;c<s;)(!f||!f.has(t[c]))&&t[c].remove(),c++;else if(t[c]===n[o-1]&&n[r]===t[s-1]){const d=t[--s].nextSibling;e.insertBefore(n[r++],t[c++].nextSibling),e.insertBefore(n[--o],d),t[s]=n[o]}else{if(!f){f=new Map;let u=r;for(;u<o;)f.set(n[u],u++)}const d=f.get(t[c]);if(d!=null)if(r<d&&d<o){let u=c,h=1,$;for(;++u<s&&u<o&&!(($=f.get(t[u]))==null||$!==d+h);)h++;if(h>d-r){const I=t[c];for(;r<d;)e.insertBefore(n[r++],I)}else e.replaceChild(n[r++],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},o=t?()=>l.untrack(()=>document.importNode(i||(i=s()),!0)):()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function ae(e,t=window.document){const n=t[N]||(t[N]=new Set);for(let i=0,s=e.length;i<s;i++){const o=e[i];n.has(o)||(n.add(o),t.addEventListener(o,be))}}function T(e,t,n){l.sharedConfig.context&&e.isConnected||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function le(e,t,n,i){l.sharedConfig.context&&e.isConnected||(i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i))}function fe(e,t){l.sharedConfig.context&&e.isConnected||(t==null?e.removeAttribute("class"):e.className=t)}function de(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]=o=>s.call(e,n[1],o))}else e.addEventListener(t,n)}function ue(e,t,n={}){const i=Object.keys(t||{}),s=Object.keys(n);let o,c;for(o=0,c=s.length;o<c;o++){const r=s[o];!r||r==="undefined"||t[r]||(L(e,r,!1),delete n[r])}for(o=0,c=i.length;o<c;o++){const r=i[o],a=!!t[r];!r||r==="undefined"||n[r]===a||!a||(L(e,r,!0),n[r]=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,o;for(o in n)t[o]==null&&i.removeProperty(o),delete n[o];for(o in t)s=t[o],s!==n[o]&&(i.setProperty(o,s),n[o]=s);return n}function ge(e,t={},n,i){const s={};return i||l.createRenderEffect(()=>s.children=x(e,t.children,s.children)),l.createRenderEffect(()=>typeof t.ref=="function"?H(t.ref,e):t.ref=e),l.createRenderEffect(()=>ye(e,t,n,!0,s,!0)),s}function H(e,t,n){return l.untrack(()=>e(t,n))}function _(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={},o=!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,o)}for(const c in t){if(c==="children"){i||x(e,t.children);continue}const r=t[c];s[c]=R(e,c,r,s[c],n,o)}}function me(e){let t,n;return!l.sharedConfig.context||!(t=l.sharedConfig.registry.get(n=Ce()))?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,o=i.length;s<o;s++)e.classList.toggle(i[s],n)}function R(e,t,n,i,s,o){let c,r,a,f,d;if(t==="style")return G(e,n,i);if(t==="classList")return ue(e,n,i);if(n===i)return i;if(t==="ref")o||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=se.has(u);if(!h&&i){const $=Array.isArray(i)?i[0]:i;e.removeEventListener(u,$)}(h||n)&&(de(e,u,n,h),h&&ae([u]))}else if(t.slice(0,5)==="attr:")T(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(a=ee.has(t))||!s&&((f=ie(t,e.tagName))||(r=p.has(t)))||(c=e.nodeName.includes("-"))){if(d)t=t.slice(5),r=!0;else if(l.sharedConfig.context&&e.isConnected)return n;t==="class"||t==="className"?fe(e,n):c&&!r&&!a?e[he(t)]=n:e[f||t]=n}else{const u=s&&t.indexOf(":")>-1&&re[t.split(":")[0]];u?le(e,u,t,n):T(e,te[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){const o=!!l.sharedConfig.context&&e.isConnected;if(o){!n&&(n=[...e.childNodes]);let a=[];for(let f=0;f<n.length;f++){const d=n[f];d.nodeType===8&&d.data.slice(0,2)==="!$"?d.remove():a.push(d)}n=a}for(;typeof n=="function";)n=n();if(t===n)return n;const c=typeof t,r=i!==void 0;if(e=r&&n[0]&&n[0].parentNode||e,c==="string"||c==="number"){if(o)return n;if(c==="number"&&(t=t.toString()),r){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=S(e,n,i,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||c==="boolean"){if(o)return n;n=S(e,n,i)}else{if(c==="function")return l.createRenderEffect(()=>{let a=t();for(;typeof a=="function";)a=a();n=x(e,a,n,i)}),()=>n;if(Array.isArray(t)){const a=[],f=n&&Array.isArray(n);if(v(a,t,n,s))return l.createRenderEffect(()=>n=x(e,a,n,i,!0)),()=>n;if(o){if(!a.length)return n;if(i===void 0)return[...e.childNodes];let d=a[0],u=[d];for(;(d=d.nextSibling)!==i;)u.push(d);return n=u}if(a.length===0){if(n=S(e,n,i),r)return n}else f?n.length===0?W(e,a,i):ce(e,n,a):(n&&S(e),W(e,a));n=a}else if(t.nodeType){if(o&&t.parentNode)return n=r?[t]:t;if(Array.isArray(n)){if(r)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 o=0,c=t.length;o<c;o++){let r=t[o],a=n&&n[e.length],f;if(!(r==null||r===!0||r===!1))if((f=typeof r)=="object"&&r.nodeType)e.push(r);else if(Array.isArray(r))s=v(e,r,a)||s;else if(f==="function")if(i){for(;typeof r=="function";)r=r();s=v(e,Array.isArray(r)?r:[r],Array.isArray(a)?a:[a])||s}else e.push(r),s=!0;else{const d=String(r);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 o=!1;for(let c=t.length-1;c>=0;c--){const r=t[c];if(s!==r){const a=r.parentNode===e;!o&&!c?a?e.replaceChild(s,r):e.insertBefore(s,n):a&&r.remove()}else o=!0}}else e.insertBefore(s,n);return[s]}function Ce(){const e=l.sharedConfig.context;return`${e.id}${e.count++}`}const $e="http://www.w3.org/2000/svg";function Se(e,t=!1){return t?document.createElementNS($e,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 o=oe.has(s),c=l.sharedConfig.context?me():Se(s,o);return ge(c,n,o),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 F=/^--\D{1}.{0,100}$/;function V(e){return F.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}\)$/,F].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}=Z,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},X=Ke,q=pe;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"&&E(t)?V(t)?`var(${t})`:t:w(b(e,t))}function b(e,t){const n=e.space??X,i=U(Object.entries(n).map(([s,o])=>[s,typeof o=="number"?`${o}px`:o]));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 V(t)?`var(${t})`:t;const n=e.sizes??q,i=U(Object.entries(n).map(([s,o])=>[s,typeof o=="number"?`${o}px`:o]));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((r,[a,f])=>r+`${a}:${f};`,""),n=()=>`--maxWidth: ${et(e.maxWidth)};`,i=()=>e.centerText?"center-text":"",s=()=>e.centerChildren?"center-children":"",o=()=>[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":o})))}const Q=l.createContext({});function nt(e){return l.createComponent(Q.Provider,{get value(){return e.theme},get children(){return e.children}})}function C(){try{return l.useContext(Q)}catch{return{}}}function it(e,t){return A(e,t)}function st(e){const t=C(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((r,[a,f])=>r+`${a}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--minItemWidth: ${it(t,e.minItemWidth)}`,o=()=>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":o})))}function ot(e,t){const[n,i]=l.createSignal(!1),[s,o]=l.createSignal();return l.onMount(()=>{P.init()}),l.createEffect(()=>{if(w(s())===void 0)return;t&&t(s());const c=P.registerCallback(s(),r=>{var f;const a=((f=r.borderBoxSize)==null?void 0:f.inlineSize)??r.contentRect.width;if(a>0){const d=a<=e;i(d)}});l.onCleanup(c)}),[n,o]}function rt(e){return Array.isArray(e)&&e.length===2&&e.every(Number.isFinite)||typeof e=="string"&&/^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e)}function ct(e){return Array.isArray(e)?e.join("/"):e}function at(e){return rt(e)?ct(e):void 0}function lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[r,a])=>c+`${r}:${a};`,""),n=()=>at(e.ratio),i=()=>n()?`--ratio: ${n()}`:"",s=()=>typeof e.position=="string"?`--position: ${e.position}`:"50%",o=()=>[t(),i(),s()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","ratio","position"]),m({style:o,"data-bedrock-frame":()=>""})))}function J(e){const t=C(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[r,a])=>c+`${r}:${a};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth??0}px`};`,o=()=>[n(),i(),s()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","minItemWidth"]),m({style:o,"data-bedrock-grid":()=>e.variant==="masonry"?"variant:masonry":""})))}const j=96;function Y(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,o]=Y(i);if(isNaN(s))return;if(!o)return s;const c=k(o,t);return typeof c=="number"?s*c:void 0}}}function z(e,t){const[n,i]=Y(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(),o=C();return l.onMount(()=>(P.init(),0)),l.createEffect(()=>{const c=w(i());if(c===void 0)return;const r=P.registerCallback(c,({target:a})=>{n(1);const f=e.gutter?b(o,e.gutter)??"1px":"1px",d=ut?k(f,a):void 0,u=Math.max(d??M,M),[h]=Array.from(a.children),$=1+Math.min(a.scrollHeight,h.scrollHeight),I=Math.max(Math.ceil($/u),M);return n(I),0});return l.onCleanup(r),0}),(()=>{var c=dt();return H(s,c),_(c,()=>e.children),l.createRenderEffect(r=>G(c,`grid-row: span ${t()};`,r)),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(J,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=C(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((a,[f,d])=>a+`${f}:${d};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>e.justify!==void 0?mt[e.justify]:void 0,o=()=>e.align!==void 0?ht[e.align]:void 0,c=()=>[n(),i()].join("; "),r=()=>[s(),o()].filter(Boolean).join(" ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","justify","align"]),m({style:c,"data-bedrock-inline-cluster":r})))}const Ct={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},$t={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function St(e){const t=C(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((u,[h,$])=>u+`${h}:${$};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,o=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",c=()=>e.justify!==void 0?Ct[e.justify]:void 0,r=()=>e.align!==void 0?$t[e.align]:void 0,a=()=>e.stretch?`stretch:${e.stretch}`:void 0,f=()=>[n(),i(),o(),s()].join("; "),d=()=>[c(),r(),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,o])=>({...i,[xt(s)]: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,[s,o])=>i+`${s}:${o};`,"")};function jt(e){const t=C(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[c,r])=>o+`${c}:${r};`,""),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=C(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[r,a])=>c+`${r}:${a};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>{switch(e.snapType){case"none":return"snapType:none";case"proximity":return"snapType:proximity";case"mandatory":return"snapType:mandatory";default:return"snapType:none"}},o=()=>[n(),i()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter"]),m({style:o,"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=C(),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.gap??e.gutter??"size00")??"0px"}`,o=()=>B[e.fraction??"1/2"]??B["1/2"],c=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,r=()=>[n(),s(),i(),c()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","gutter","fraction"]),m({style:r,"data-bedrock-split":o})))}const Et={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function It(e){const t=C(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((r,[a,f])=>r+`${a}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>[n(),i()].join("; "),o=()=>e.align!==void 0?Et[e.align]:void 0,c=()=>[o()].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=C(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((r,[a,f])=>r+`${a}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--minHeight: ${Tt(e.minHeight)};`,o=()=>e.variant==="stretch-content"||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":o})))}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 _(i,()=>t.children),i})(),l.createMemo(()=>t.bottom)]}}))}function zt(e){const t=C(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((r,[a,f])=>r+`${a}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,s=()=>`--columns: ${w(Math.max(e.colCount??e.columns??1,1))??1};`,o=()=>e.switchAt?`--switchAt: ${A(t,e.switchAt)??"0px"};`:"",c=()=>[n(),i(),s(),o()].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,[r,a])=>c+`${r}:${a};`,""),n=()=>`--span: ${kt(e.span)};`,i=()=>e.offsetStart&&e.offsetStart>0?`--offsetStart: ${e.offsetStart};`:"",s=()=>e.offsetEnd&&e.offsetEnd>0?`--offsetEnd: ${e.offsetEnd};`:"",o=()=>[t(),n(),i(),s()].join("; ");return y(()=>e.as??"div",l.mergeProps(g(e,["as","span","offsetStart","offsetEnd"]),m({style:o,"data-bedrock-column":()=>""})))}exports.Center=tt;exports.Column=Nt;exports.ColumnDrop=st;exports.Columns=zt;exports.Cover=Ot;exports.Frame=lt;exports.Grid=J;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=q;exports.spacing=X;exports.useTheme=C;
|
package/lib/index.m.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createRenderEffect as w, sharedConfig as
|
|
1
|
+
import ot from "open-props";
|
|
2
|
+
import { createRenderEffect as w, sharedConfig as y, splitProps as V, createMemo as T, untrack as L, createComponent as I, mergeProps as d, createContext as ct, useContext as rt, createSignal as v, onMount as X, createEffect as U, onCleanup as q, children as lt } from "solid-js";
|
|
3
3
|
import { init as Q, registerCallback as Y } from "@bedrock-layout/register-resize-callback";
|
|
4
|
-
const
|
|
4
|
+
const at = [
|
|
5
5
|
"allowfullscreen",
|
|
6
6
|
"async",
|
|
7
7
|
"autofocus",
|
|
@@ -27,7 +27,7 @@ const lt = [
|
|
|
27
27
|
"reversed",
|
|
28
28
|
"seamless",
|
|
29
29
|
"selected"
|
|
30
|
-
],
|
|
30
|
+
], ft = /* @__PURE__ */ new Set([
|
|
31
31
|
"className",
|
|
32
32
|
"value",
|
|
33
33
|
"readOnly",
|
|
@@ -35,16 +35,16 @@ const lt = [
|
|
|
35
35
|
"isMap",
|
|
36
36
|
"noModule",
|
|
37
37
|
"playsInline",
|
|
38
|
-
...
|
|
39
|
-
]),
|
|
38
|
+
...at
|
|
39
|
+
]), ut = /* @__PURE__ */ new Set([
|
|
40
40
|
"innerHTML",
|
|
41
41
|
"textContent",
|
|
42
42
|
"innerText",
|
|
43
43
|
"children"
|
|
44
|
-
]),
|
|
44
|
+
]), dt = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
45
45
|
className: "class",
|
|
46
46
|
htmlFor: "for"
|
|
47
|
-
}),
|
|
47
|
+
}), yt = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
48
48
|
class: "className",
|
|
49
49
|
formnovalidate: {
|
|
50
50
|
$: "formNoValidate",
|
|
@@ -69,11 +69,11 @@ const lt = [
|
|
|
69
69
|
TEXTAREA: 1
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
function
|
|
73
|
-
const n =
|
|
72
|
+
function mt(t, e) {
|
|
73
|
+
const n = yt[t];
|
|
74
74
|
return typeof n == "object" ? n[e] ? n.$ : void 0 : n;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const ht = /* @__PURE__ */ new Set([
|
|
77
77
|
"beforeinput",
|
|
78
78
|
"click",
|
|
79
79
|
"dblclick",
|
|
@@ -96,7 +96,7 @@ const mt = /* @__PURE__ */ new Set([
|
|
|
96
96
|
"touchend",
|
|
97
97
|
"touchmove",
|
|
98
98
|
"touchstart"
|
|
99
|
-
]),
|
|
99
|
+
]), gt = /* @__PURE__ */ new Set([
|
|
100
100
|
"altGlyph",
|
|
101
101
|
"altGlyphDef",
|
|
102
102
|
"altGlyphItem",
|
|
@@ -119,6 +119,7 @@ const mt = /* @__PURE__ */ new Set([
|
|
|
119
119
|
"feDiffuseLighting",
|
|
120
120
|
"feDisplacementMap",
|
|
121
121
|
"feDistantLight",
|
|
122
|
+
"feDropShadow",
|
|
122
123
|
"feFlood",
|
|
123
124
|
"feFuncA",
|
|
124
125
|
"feFuncB",
|
|
@@ -173,48 +174,48 @@ const mt = /* @__PURE__ */ new Set([
|
|
|
173
174
|
"use",
|
|
174
175
|
"view",
|
|
175
176
|
"vkern"
|
|
176
|
-
]),
|
|
177
|
+
]), bt = {
|
|
177
178
|
xlink: "http://www.w3.org/1999/xlink",
|
|
178
179
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
179
180
|
};
|
|
180
|
-
function
|
|
181
|
-
let i = n.length, s = e.length,
|
|
182
|
-
for (; r < s ||
|
|
183
|
-
if (e[r] === n[
|
|
184
|
-
r++,
|
|
181
|
+
function $t(t, e, n) {
|
|
182
|
+
let i = n.length, s = e.length, o = i, r = 0, c = 0, l = e[s - 1].nextSibling, a = null;
|
|
183
|
+
for (; r < s || c < o; ) {
|
|
184
|
+
if (e[r] === n[c]) {
|
|
185
|
+
r++, c++;
|
|
185
186
|
continue;
|
|
186
187
|
}
|
|
187
|
-
for (; e[s - 1] === n[
|
|
188
|
-
s--,
|
|
188
|
+
for (; e[s - 1] === n[o - 1]; )
|
|
189
|
+
s--, o--;
|
|
189
190
|
if (s === r) {
|
|
190
|
-
const f =
|
|
191
|
-
for (;
|
|
192
|
-
t.insertBefore(n[
|
|
193
|
-
} else if (
|
|
191
|
+
const f = o < i ? c ? n[c - 1].nextSibling : n[o - c] : l;
|
|
192
|
+
for (; c < o; )
|
|
193
|
+
t.insertBefore(n[c++], f);
|
|
194
|
+
} else if (o === c)
|
|
194
195
|
for (; r < s; )
|
|
195
196
|
(!a || !a.has(e[r])) && e[r].remove(), r++;
|
|
196
|
-
else if (e[r] === n[
|
|
197
|
+
else if (e[r] === n[o - 1] && n[c] === e[s - 1]) {
|
|
197
198
|
const f = e[--s].nextSibling;
|
|
198
|
-
t.insertBefore(n[
|
|
199
|
+
t.insertBefore(n[c++], e[r++].nextSibling), t.insertBefore(n[--o], f), e[s] = n[o];
|
|
199
200
|
} else {
|
|
200
201
|
if (!a) {
|
|
201
202
|
a = /* @__PURE__ */ new Map();
|
|
202
|
-
let u =
|
|
203
|
-
for (; u <
|
|
203
|
+
let u = c;
|
|
204
|
+
for (; u < o; )
|
|
204
205
|
a.set(n[u], u++);
|
|
205
206
|
}
|
|
206
207
|
const f = a.get(e[r]);
|
|
207
208
|
if (f != null)
|
|
208
|
-
if (
|
|
209
|
+
if (c < f && f < o) {
|
|
209
210
|
let u = r, b = 1, S;
|
|
210
|
-
for (; ++u < s && u <
|
|
211
|
+
for (; ++u < s && u < o && !((S = a.get(e[u])) == null || S !== f + b); )
|
|
211
212
|
b++;
|
|
212
|
-
if (b > f -
|
|
213
|
+
if (b > f - c) {
|
|
213
214
|
const P = e[r];
|
|
214
|
-
for (;
|
|
215
|
-
t.insertBefore(n[
|
|
215
|
+
for (; c < f; )
|
|
216
|
+
t.insertBefore(n[c++], P);
|
|
216
217
|
} else
|
|
217
|
-
t.replaceChild(n[
|
|
218
|
+
t.replaceChild(n[c++], e[r++]);
|
|
218
219
|
} else
|
|
219
220
|
r++;
|
|
220
221
|
else
|
|
@@ -222,50 +223,50 @@ function bt(t, e, n) {
|
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
225
|
}
|
|
225
|
-
const
|
|
226
|
+
const D = "_$DX_DELEGATE";
|
|
226
227
|
function J(t, e, n) {
|
|
227
228
|
let i;
|
|
228
229
|
const s = () => {
|
|
229
230
|
const r = document.createElement("template");
|
|
230
231
|
return r.innerHTML = t, n ? r.content.firstChild.firstChild : r.content.firstChild;
|
|
231
|
-
},
|
|
232
|
-
return
|
|
232
|
+
}, o = e ? () => L(() => document.importNode(i || (i = s()), !0)) : () => (i || (i = s())).cloneNode(!0);
|
|
233
|
+
return o.cloneNode = o, o;
|
|
233
234
|
}
|
|
234
|
-
function
|
|
235
|
-
const n = e[
|
|
235
|
+
function xt(t, e = window.document) {
|
|
236
|
+
const n = e[D] || (e[D] = /* @__PURE__ */ new Set());
|
|
236
237
|
for (let i = 0, s = t.length; i < s; i++) {
|
|
237
|
-
const
|
|
238
|
-
n.has(
|
|
238
|
+
const o = t[i];
|
|
239
|
+
n.has(o) || (n.add(o), e.addEventListener(o, vt));
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
242
|
function z(t, e, n) {
|
|
242
|
-
|
|
243
|
+
y.context && t.isConnected || (n == null ? t.removeAttribute(e) : t.setAttribute(e, n));
|
|
243
244
|
}
|
|
244
|
-
function
|
|
245
|
-
|
|
245
|
+
function St(t, e, n, i) {
|
|
246
|
+
y.context && t.isConnected || (i == null ? t.removeAttributeNS(e, n) : t.setAttributeNS(e, n, i));
|
|
246
247
|
}
|
|
247
|
-
function
|
|
248
|
-
|
|
248
|
+
function wt(t, e) {
|
|
249
|
+
y.context && t.isConnected || (e == null ? t.removeAttribute("class") : t.className = e);
|
|
249
250
|
}
|
|
250
|
-
function
|
|
251
|
+
function jt(t, e, n, i) {
|
|
251
252
|
if (i)
|
|
252
253
|
Array.isArray(n) ? (t[`$$${e}`] = n[0], t[`$$${e}Data`] = n[1]) : t[`$$${e}`] = n;
|
|
253
254
|
else if (Array.isArray(n)) {
|
|
254
255
|
const s = n[0];
|
|
255
|
-
t.addEventListener(e, n[0] = (
|
|
256
|
+
t.addEventListener(e, n[0] = (o) => s.call(t, n[1], o));
|
|
256
257
|
} else
|
|
257
258
|
t.addEventListener(e, n);
|
|
258
259
|
}
|
|
259
|
-
function
|
|
260
|
+
function Ct(t, e, n = {}) {
|
|
260
261
|
const i = Object.keys(e || {}), s = Object.keys(n);
|
|
261
|
-
let
|
|
262
|
-
for (
|
|
263
|
-
const
|
|
264
|
-
!
|
|
262
|
+
let o, r;
|
|
263
|
+
for (o = 0, r = s.length; o < r; o++) {
|
|
264
|
+
const c = s[o];
|
|
265
|
+
!c || c === "undefined" || e[c] || (R(t, c, !1), delete n[c]);
|
|
265
266
|
}
|
|
266
|
-
for (
|
|
267
|
-
const
|
|
268
|
-
!
|
|
267
|
+
for (o = 0, r = i.length; o < r; o++) {
|
|
268
|
+
const c = i[o], l = !!e[c];
|
|
269
|
+
!c || c === "undefined" || n[c] === l || !l || (R(t, c, !0), n[c] = l);
|
|
269
270
|
}
|
|
270
271
|
return n;
|
|
271
272
|
}
|
|
@@ -276,66 +277,68 @@ function Z(t, e, n) {
|
|
|
276
277
|
if (typeof e == "string")
|
|
277
278
|
return i.cssText = e;
|
|
278
279
|
typeof n == "string" && (i.cssText = n = void 0), n || (n = {}), e || (e = {});
|
|
279
|
-
let s,
|
|
280
|
-
for (
|
|
281
|
-
e[
|
|
282
|
-
for (
|
|
283
|
-
s = e[
|
|
280
|
+
let s, o;
|
|
281
|
+
for (o in n)
|
|
282
|
+
e[o] == null && i.removeProperty(o), delete n[o];
|
|
283
|
+
for (o in e)
|
|
284
|
+
s = e[o], s !== n[o] && (i.setProperty(o, s), n[o] = s);
|
|
284
285
|
return n;
|
|
285
286
|
}
|
|
286
287
|
function At(t, e = {}, n, i) {
|
|
287
288
|
const s = {};
|
|
288
289
|
return i || w(
|
|
289
|
-
() => s.children =
|
|
290
|
-
), w(
|
|
290
|
+
() => s.children = C(t, e.children, s.children)
|
|
291
|
+
), w(
|
|
292
|
+
() => typeof e.ref == "function" ? K(e.ref, t) : e.ref = t
|
|
293
|
+
), w(() => Et(t, e, n, !0, s, !0)), s;
|
|
291
294
|
}
|
|
292
|
-
function
|
|
295
|
+
function K(t, e, n) {
|
|
293
296
|
return L(() => t(e, n));
|
|
294
297
|
}
|
|
295
|
-
function
|
|
298
|
+
function p(t, e, n, i) {
|
|
296
299
|
if (n !== void 0 && !i && (i = []), typeof e != "function")
|
|
297
|
-
return
|
|
298
|
-
w((s) =>
|
|
300
|
+
return C(t, e, i, n);
|
|
301
|
+
w((s) => C(t, e(), s, n), i);
|
|
299
302
|
}
|
|
300
|
-
function Et(t, e, n, i, s = {},
|
|
303
|
+
function Et(t, e, n, i, s = {}, o = !1) {
|
|
301
304
|
e || (e = {});
|
|
302
305
|
for (const r in s)
|
|
303
306
|
if (!(r in e)) {
|
|
304
307
|
if (r === "children")
|
|
305
308
|
continue;
|
|
306
|
-
s[r] = G(t, r, null, s[r], n,
|
|
309
|
+
s[r] = G(t, r, null, s[r], n, o);
|
|
307
310
|
}
|
|
308
311
|
for (const r in e) {
|
|
309
312
|
if (r === "children") {
|
|
310
|
-
i ||
|
|
313
|
+
i || C(t, e.children);
|
|
311
314
|
continue;
|
|
312
315
|
}
|
|
313
|
-
const
|
|
314
|
-
s[r] = G(t, r,
|
|
316
|
+
const c = e[r];
|
|
317
|
+
s[r] = G(t, r, c, s[r], n, o);
|
|
315
318
|
}
|
|
316
319
|
}
|
|
317
320
|
function It(t) {
|
|
318
321
|
let e, n;
|
|
319
|
-
return !
|
|
322
|
+
return !y.context || !(e = y.registry.get(n = Ot())) ? t() : (y.completed && y.completed.add(e), y.registry.delete(n), e);
|
|
320
323
|
}
|
|
321
324
|
function Tt(t) {
|
|
322
325
|
return t.toLowerCase().replace(/-([a-z])/g, (e, n) => n.toUpperCase());
|
|
323
326
|
}
|
|
324
|
-
function
|
|
327
|
+
function R(t, e, n) {
|
|
325
328
|
const i = e.trim().split(/\s+/);
|
|
326
|
-
for (let s = 0,
|
|
329
|
+
for (let s = 0, o = i.length; s < o; s++)
|
|
327
330
|
t.classList.toggle(i[s], n);
|
|
328
331
|
}
|
|
329
|
-
function G(t, e, n, i, s,
|
|
330
|
-
let r,
|
|
332
|
+
function G(t, e, n, i, s, o) {
|
|
333
|
+
let r, c, l, a, f;
|
|
331
334
|
if (e === "style")
|
|
332
335
|
return Z(t, n, i);
|
|
333
336
|
if (e === "classList")
|
|
334
|
-
return
|
|
337
|
+
return Ct(t, n, i);
|
|
335
338
|
if (n === i)
|
|
336
339
|
return i;
|
|
337
340
|
if (e === "ref")
|
|
338
|
-
|
|
341
|
+
o || n(t);
|
|
339
342
|
else if (e.slice(0, 3) === "on:") {
|
|
340
343
|
const u = e.slice(3);
|
|
341
344
|
i && t.removeEventListener(u, i), n && t.addEventListener(u, n);
|
|
@@ -343,23 +346,23 @@ function G(t, e, n, i, s, c) {
|
|
|
343
346
|
const u = e.slice(10);
|
|
344
347
|
i && t.removeEventListener(u, i, !0), n && t.addEventListener(u, n, !0);
|
|
345
348
|
} else if (e.slice(0, 2) === "on") {
|
|
346
|
-
const u = e.slice(2).toLowerCase(), b =
|
|
349
|
+
const u = e.slice(2).toLowerCase(), b = ht.has(u);
|
|
347
350
|
if (!b && i) {
|
|
348
351
|
const S = Array.isArray(i) ? i[0] : i;
|
|
349
352
|
t.removeEventListener(u, S);
|
|
350
353
|
}
|
|
351
|
-
(b || n) && (
|
|
354
|
+
(b || n) && (jt(t, u, n, b), b && xt([u]));
|
|
352
355
|
} else if (e.slice(0, 5) === "attr:")
|
|
353
356
|
z(t, e.slice(5), n);
|
|
354
|
-
else if ((f = e.slice(0, 5) === "prop:") || (l =
|
|
357
|
+
else if ((f = e.slice(0, 5) === "prop:") || (l = ut.has(e)) || !s && ((a = mt(e, t.tagName)) || (c = ft.has(e))) || (r = t.nodeName.includes("-"))) {
|
|
355
358
|
if (f)
|
|
356
|
-
e = e.slice(5),
|
|
357
|
-
else if (
|
|
359
|
+
e = e.slice(5), c = !0;
|
|
360
|
+
else if (y.context && t.isConnected)
|
|
358
361
|
return n;
|
|
359
|
-
e === "class" || e === "className" ?
|
|
362
|
+
e === "class" || e === "className" ? wt(t, n) : r && !c && !l ? t[Tt(e)] = n : t[a || e] = n;
|
|
360
363
|
} else {
|
|
361
|
-
const u = s && e.indexOf(":") > -1 &&
|
|
362
|
-
u ?
|
|
364
|
+
const u = s && e.indexOf(":") > -1 && bt[e.split(":")[0]];
|
|
365
|
+
u ? St(t, u, e, n) : z(t, dt[e] || e, n);
|
|
363
366
|
}
|
|
364
367
|
return n;
|
|
365
368
|
}
|
|
@@ -374,7 +377,7 @@ function vt(t) {
|
|
|
374
377
|
get() {
|
|
375
378
|
return n || document;
|
|
376
379
|
}
|
|
377
|
-
}),
|
|
380
|
+
}), y.registry && !y.done && (y.done = _$HY.done = !0); n; ) {
|
|
378
381
|
const i = n[e];
|
|
379
382
|
if (i && !n.disabled) {
|
|
380
383
|
const s = n[`${e}Data`];
|
|
@@ -384,66 +387,67 @@ function vt(t) {
|
|
|
384
387
|
n = n._$host || n.parentNode || n.host;
|
|
385
388
|
}
|
|
386
389
|
}
|
|
387
|
-
function
|
|
388
|
-
|
|
390
|
+
function C(t, e, n, i, s) {
|
|
391
|
+
const o = !!y.context && t.isConnected;
|
|
392
|
+
if (o) {
|
|
389
393
|
!n && (n = [...t.childNodes]);
|
|
390
|
-
let
|
|
391
|
-
for (let
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
+
let l = [];
|
|
395
|
+
for (let a = 0; a < n.length; a++) {
|
|
396
|
+
const f = n[a];
|
|
397
|
+
f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : l.push(f);
|
|
394
398
|
}
|
|
395
|
-
n =
|
|
399
|
+
n = l;
|
|
396
400
|
}
|
|
397
401
|
for (; typeof n == "function"; )
|
|
398
402
|
n = n();
|
|
399
403
|
if (e === n)
|
|
400
404
|
return n;
|
|
401
|
-
const
|
|
402
|
-
if (t =
|
|
403
|
-
if (
|
|
405
|
+
const r = typeof e, c = i !== void 0;
|
|
406
|
+
if (t = c && n[0] && n[0].parentNode || t, r === "string" || r === "number") {
|
|
407
|
+
if (o)
|
|
404
408
|
return n;
|
|
405
|
-
if (
|
|
406
|
-
let
|
|
407
|
-
|
|
409
|
+
if (r === "number" && (e = e.toString()), c) {
|
|
410
|
+
let l = n[0];
|
|
411
|
+
l && l.nodeType === 3 ? l.data !== e && (l.data = e) : l = document.createTextNode(e), n = j(t, n, i, l);
|
|
408
412
|
} else
|
|
409
413
|
n !== "" && typeof n == "string" ? n = t.firstChild.data = e : n = t.textContent = e;
|
|
410
|
-
} else if (e == null ||
|
|
411
|
-
if (
|
|
414
|
+
} else if (e == null || r === "boolean") {
|
|
415
|
+
if (o)
|
|
412
416
|
return n;
|
|
413
417
|
n = j(t, n, i);
|
|
414
418
|
} else {
|
|
415
|
-
if (
|
|
419
|
+
if (r === "function")
|
|
416
420
|
return w(() => {
|
|
417
|
-
let
|
|
418
|
-
for (; typeof
|
|
419
|
-
|
|
420
|
-
n =
|
|
421
|
+
let l = e();
|
|
422
|
+
for (; typeof l == "function"; )
|
|
423
|
+
l = l();
|
|
424
|
+
n = C(t, l, n, i);
|
|
421
425
|
}), () => n;
|
|
422
426
|
if (Array.isArray(e)) {
|
|
423
|
-
const
|
|
424
|
-
if (N(
|
|
425
|
-
return w(() => n =
|
|
426
|
-
if (
|
|
427
|
-
if (!
|
|
427
|
+
const l = [], a = n && Array.isArray(n);
|
|
428
|
+
if (N(l, e, n, s))
|
|
429
|
+
return w(() => n = C(t, l, n, i, !0)), () => n;
|
|
430
|
+
if (o) {
|
|
431
|
+
if (!l.length)
|
|
428
432
|
return n;
|
|
429
433
|
if (i === void 0)
|
|
430
434
|
return [...t.childNodes];
|
|
431
|
-
let
|
|
432
|
-
for (; (
|
|
433
|
-
|
|
434
|
-
return n =
|
|
435
|
+
let f = l[0], u = [f];
|
|
436
|
+
for (; (f = f.nextSibling) !== i; )
|
|
437
|
+
u.push(f);
|
|
438
|
+
return n = u;
|
|
435
439
|
}
|
|
436
|
-
if (
|
|
437
|
-
if (n = j(t, n, i),
|
|
440
|
+
if (l.length === 0) {
|
|
441
|
+
if (n = j(t, n, i), c)
|
|
438
442
|
return n;
|
|
439
443
|
} else
|
|
440
|
-
|
|
441
|
-
n =
|
|
444
|
+
a ? n.length === 0 ? H(t, l, i) : $t(t, n, l) : (n && j(t), H(t, l));
|
|
445
|
+
n = l;
|
|
442
446
|
} else if (e.nodeType) {
|
|
443
|
-
if (
|
|
444
|
-
return n =
|
|
447
|
+
if (o && e.parentNode)
|
|
448
|
+
return n = c ? [e] : e;
|
|
445
449
|
if (Array.isArray(n)) {
|
|
446
|
-
if (
|
|
450
|
+
if (c)
|
|
447
451
|
return n = j(t, n, i, e);
|
|
448
452
|
j(t, n, null, e);
|
|
449
453
|
} else
|
|
@@ -455,26 +459,26 @@ function A(t, e, n, i, s) {
|
|
|
455
459
|
}
|
|
456
460
|
function N(t, e, n, i) {
|
|
457
461
|
let s = !1;
|
|
458
|
-
for (let
|
|
459
|
-
let
|
|
460
|
-
if (!(
|
|
461
|
-
if ((a = typeof
|
|
462
|
-
t.push(
|
|
463
|
-
else if (Array.isArray(
|
|
464
|
-
s = N(t,
|
|
462
|
+
for (let o = 0, r = e.length; o < r; o++) {
|
|
463
|
+
let c = e[o], l = n && n[t.length], a;
|
|
464
|
+
if (!(c == null || c === !0 || c === !1))
|
|
465
|
+
if ((a = typeof c) == "object" && c.nodeType)
|
|
466
|
+
t.push(c);
|
|
467
|
+
else if (Array.isArray(c))
|
|
468
|
+
s = N(t, c, l) || s;
|
|
465
469
|
else if (a === "function")
|
|
466
470
|
if (i) {
|
|
467
|
-
for (; typeof
|
|
468
|
-
|
|
471
|
+
for (; typeof c == "function"; )
|
|
472
|
+
c = c();
|
|
469
473
|
s = N(
|
|
470
474
|
t,
|
|
471
|
-
Array.isArray(
|
|
475
|
+
Array.isArray(c) ? c : [c],
|
|
472
476
|
Array.isArray(l) ? l : [l]
|
|
473
477
|
) || s;
|
|
474
478
|
} else
|
|
475
|
-
t.push(
|
|
479
|
+
t.push(c), s = !0;
|
|
476
480
|
else {
|
|
477
|
-
const f = String(
|
|
481
|
+
const f = String(c);
|
|
478
482
|
l && l.nodeType === 3 && l.data === f ? t.push(l) : t.push(document.createTextNode(f));
|
|
479
483
|
}
|
|
480
484
|
}
|
|
@@ -489,21 +493,21 @@ function j(t, e, n, i) {
|
|
|
489
493
|
return t.textContent = "";
|
|
490
494
|
const s = i || document.createTextNode("");
|
|
491
495
|
if (e.length) {
|
|
492
|
-
let
|
|
496
|
+
let o = !1;
|
|
493
497
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
494
|
-
const
|
|
495
|
-
if (s !==
|
|
496
|
-
const l =
|
|
497
|
-
!
|
|
498
|
+
const c = e[r];
|
|
499
|
+
if (s !== c) {
|
|
500
|
+
const l = c.parentNode === t;
|
|
501
|
+
!o && !r ? l ? t.replaceChild(s, c) : t.insertBefore(s, n) : l && c.remove();
|
|
498
502
|
} else
|
|
499
|
-
|
|
503
|
+
o = !0;
|
|
500
504
|
}
|
|
501
505
|
} else
|
|
502
506
|
t.insertBefore(s, n);
|
|
503
507
|
return [s];
|
|
504
508
|
}
|
|
505
509
|
function Ot() {
|
|
506
|
-
const t =
|
|
510
|
+
const t = y.context;
|
|
507
511
|
return `${t.id}${t.count++}`;
|
|
508
512
|
}
|
|
509
513
|
const Pt = "http://www.w3.org/2000/svg";
|
|
@@ -518,12 +522,12 @@ function zt(t) {
|
|
|
518
522
|
case "function":
|
|
519
523
|
return L(() => s(n));
|
|
520
524
|
case "string":
|
|
521
|
-
const
|
|
522
|
-
return At(r, n,
|
|
525
|
+
const o = gt.has(s), r = y.context ? It() : Mt(s, o);
|
|
526
|
+
return At(r, n, o), r;
|
|
523
527
|
}
|
|
524
528
|
});
|
|
525
529
|
}
|
|
526
|
-
function
|
|
530
|
+
function A(t) {
|
|
527
531
|
return t ?? void 0;
|
|
528
532
|
}
|
|
529
533
|
function m(t, e) {
|
|
@@ -538,7 +542,7 @@ function m(t, e) {
|
|
|
538
542
|
}), {});
|
|
539
543
|
}
|
|
540
544
|
function h(t, e) {
|
|
541
|
-
return I(zt,
|
|
545
|
+
return I(zt, d({
|
|
542
546
|
get component() {
|
|
543
547
|
return t();
|
|
544
548
|
}
|
|
@@ -556,12 +560,12 @@ function g(t) {
|
|
|
556
560
|
});
|
|
557
561
|
}, {}) : new Error("Please provide an object with accessor values only.");
|
|
558
562
|
}
|
|
559
|
-
const
|
|
560
|
-
function
|
|
561
|
-
return
|
|
563
|
+
const tt = /^--\D{1}.{0,100}$/;
|
|
564
|
+
function et(t) {
|
|
565
|
+
return tt.test(t);
|
|
562
566
|
}
|
|
563
567
|
function W(t) {
|
|
564
|
-
return typeof t != "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}\)$/,
|
|
568
|
+
return typeof t != "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}\)$/, tt].some((e) => e.test(t));
|
|
565
569
|
}
|
|
566
570
|
const {
|
|
567
571
|
sizeXxs: Nt,
|
|
@@ -569,8 +573,8 @@ const {
|
|
|
569
573
|
sizeSm: Lt,
|
|
570
574
|
sizeMd: Wt,
|
|
571
575
|
sizeLg: Bt,
|
|
572
|
-
sizeXl:
|
|
573
|
-
sizeXxl:
|
|
576
|
+
sizeXl: Dt,
|
|
577
|
+
sizeXxl: Rt,
|
|
574
578
|
sizeContent1: Gt,
|
|
575
579
|
sizeContent2: Ht,
|
|
576
580
|
sizeContent3: _t,
|
|
@@ -594,7 +598,7 @@ const {
|
|
|
594
598
|
size13: ce,
|
|
595
599
|
size14: re,
|
|
596
600
|
size15: le
|
|
597
|
-
} =
|
|
601
|
+
} = ot, ae = {
|
|
598
602
|
size000: Ut,
|
|
599
603
|
size00: qt,
|
|
600
604
|
size1: Qt,
|
|
@@ -618,8 +622,8 @@ const {
|
|
|
618
622
|
sizeSm: Lt,
|
|
619
623
|
sizeMd: Wt,
|
|
620
624
|
sizeLg: Bt,
|
|
621
|
-
sizeXl:
|
|
622
|
-
sizeXxl:
|
|
625
|
+
sizeXl: Dt,
|
|
626
|
+
sizeXxl: Rt,
|
|
623
627
|
sizeContent1: Gt,
|
|
624
628
|
sizeContent2: Ht,
|
|
625
629
|
sizeContent3: _t,
|
|
@@ -627,7 +631,7 @@ const {
|
|
|
627
631
|
sizeHeader2: Vt,
|
|
628
632
|
sizeHeader3: Xt
|
|
629
633
|
}, ue = ae, de = fe;
|
|
630
|
-
function
|
|
634
|
+
function nt(t) {
|
|
631
635
|
return t.reduce((e, [n, i]) => ({
|
|
632
636
|
...e,
|
|
633
637
|
[n]: i
|
|
@@ -635,11 +639,11 @@ function et(t) {
|
|
|
635
639
|
}
|
|
636
640
|
function _(t, e) {
|
|
637
641
|
if (e !== void 0)
|
|
638
|
-
return typeof e == "number" && e >= 0 ? `${e}px` : typeof e == "string" && W(e) ?
|
|
642
|
+
return typeof e == "number" && e >= 0 ? `${e}px` : typeof e == "string" && W(e) ? et(e) ? `var(${e})` : e : A($(t, e));
|
|
639
643
|
}
|
|
640
644
|
function $(t, e) {
|
|
641
|
-
const n = t.space ?? ue, i =
|
|
642
|
-
return
|
|
645
|
+
const n = t.space ?? ue, i = nt(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
|
|
646
|
+
return A(i[e]);
|
|
643
647
|
}
|
|
644
648
|
function O(t, e) {
|
|
645
649
|
if (e === void 0)
|
|
@@ -647,23 +651,23 @@ function O(t, e) {
|
|
|
647
651
|
if (typeof e == "number" && e >= 0)
|
|
648
652
|
return `${e}px`;
|
|
649
653
|
if (typeof e == "string" && W(e))
|
|
650
|
-
return
|
|
651
|
-
const n = t.sizes ?? de, i =
|
|
652
|
-
return
|
|
654
|
+
return et(e) ? `var(${e})` : e;
|
|
655
|
+
const n = t.sizes ?? de, i = nt(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
|
|
656
|
+
return A(i[e]);
|
|
653
657
|
}
|
|
654
658
|
function ye(t) {
|
|
655
659
|
return t === void 0 ? "100%" : typeof t == "number" ? `${t}px` : t;
|
|
656
660
|
}
|
|
657
661
|
function Be(t) {
|
|
658
|
-
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((
|
|
659
|
-
return h(() => t.as ?? "div",
|
|
662
|
+
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), n = () => `--maxWidth: ${ye(t.maxWidth)};`, i = () => t.centerText ? "center-text" : "", s = () => t.centerChildren ? "center-children" : "", o = () => [i(), s()].filter(Boolean).join(" "), r = () => [e(), n()].join("; ");
|
|
663
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "maxWidth", "centerText", "centerChildren"]), g({
|
|
660
664
|
style: r,
|
|
661
|
-
"data-bedrock-center":
|
|
665
|
+
"data-bedrock-center": o
|
|
662
666
|
})));
|
|
663
667
|
}
|
|
664
|
-
const
|
|
665
|
-
function
|
|
666
|
-
return I(
|
|
668
|
+
const it = ct({});
|
|
669
|
+
function De(t) {
|
|
670
|
+
return I(it.Provider, {
|
|
667
671
|
get value() {
|
|
668
672
|
return t.theme;
|
|
669
673
|
},
|
|
@@ -674,7 +678,7 @@ function Re(t) {
|
|
|
674
678
|
}
|
|
675
679
|
function x() {
|
|
676
680
|
try {
|
|
677
|
-
return
|
|
681
|
+
return rt(it);
|
|
678
682
|
} catch {
|
|
679
683
|
return {};
|
|
680
684
|
}
|
|
@@ -682,31 +686,31 @@ function x() {
|
|
|
682
686
|
function me(t, e) {
|
|
683
687
|
return O(t, e);
|
|
684
688
|
}
|
|
685
|
-
function
|
|
686
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((
|
|
687
|
-
return h(() => t.as ?? "div",
|
|
689
|
+
function Re(t) {
|
|
690
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${me(e, t.minItemWidth)}`, o = () => t.noStretchedColumns === !0 ? "no-stretched-columns" : "", r = () => [n(), i(), s()].join("; ");
|
|
691
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "minItemWidth", "noStretchedColumns"]), g({
|
|
688
692
|
style: r,
|
|
689
|
-
"data-bedrock-column-drop":
|
|
693
|
+
"data-bedrock-column-drop": o
|
|
690
694
|
})));
|
|
691
695
|
}
|
|
692
696
|
function Ge(t, e) {
|
|
693
|
-
const [n, i] = v(!1), [s,
|
|
697
|
+
const [n, i] = v(!1), [s, o] = v();
|
|
694
698
|
return X(() => {
|
|
695
699
|
Q();
|
|
696
700
|
}), U(() => {
|
|
697
|
-
if (
|
|
701
|
+
if (A(s()) === void 0)
|
|
698
702
|
return;
|
|
699
703
|
e && e(s());
|
|
700
|
-
const r = Y(s(), (
|
|
704
|
+
const r = Y(s(), (c) => {
|
|
701
705
|
var a;
|
|
702
|
-
const l = ((a =
|
|
706
|
+
const l = ((a = c.borderBoxSize) == null ? void 0 : a.inlineSize) ?? c.contentRect.width;
|
|
703
707
|
if (l > 0) {
|
|
704
708
|
const f = l <= t;
|
|
705
709
|
i(f);
|
|
706
710
|
}
|
|
707
711
|
});
|
|
708
712
|
q(r);
|
|
709
|
-
}), [n,
|
|
713
|
+
}), [n, o];
|
|
710
714
|
}
|
|
711
715
|
function he(t) {
|
|
712
716
|
return Array.isArray(t) && t.length === 2 && t.every(Number.isFinite) || typeof t == "string" && /^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(t);
|
|
@@ -718,21 +722,21 @@ function be(t) {
|
|
|
718
722
|
return he(t) ? ge(t) : void 0;
|
|
719
723
|
}
|
|
720
724
|
function He(t) {
|
|
721
|
-
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [
|
|
722
|
-
return h(() => t.as ?? "div",
|
|
723
|
-
style:
|
|
725
|
+
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [c, l]) => r + `${c}:${l};`, ""), n = () => be(t.ratio), i = () => n() ? `--ratio: ${n()}` : "", s = () => typeof t.position == "string" ? `--position: ${t.position}` : "50%", o = () => [e(), i(), s()].join("; ");
|
|
726
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "ratio", "position"]), g({
|
|
727
|
+
style: o,
|
|
724
728
|
"data-bedrock-frame": () => ""
|
|
725
729
|
})));
|
|
726
730
|
}
|
|
727
731
|
function $e(t) {
|
|
728
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [
|
|
729
|
-
return h(() => t.as ?? "div",
|
|
730
|
-
style:
|
|
732
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [c, l]) => r + `${c}:${l};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth ?? 0}px`};`, o = () => [n(), i(), s()].join("; ");
|
|
733
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "minItemWidth"]), g({
|
|
734
|
+
style: o,
|
|
731
735
|
"data-bedrock-grid": () => t.variant === "masonry" ? "variant:masonry" : ""
|
|
732
736
|
})));
|
|
733
737
|
}
|
|
734
738
|
const E = 96;
|
|
735
|
-
function
|
|
739
|
+
function st(t) {
|
|
736
740
|
const e = String(t), n = parseFloat(e), [, i] = e.match(/[\d.\-+]*\s*(.*)/) ?? ["", ""];
|
|
737
741
|
return [n, i];
|
|
738
742
|
}
|
|
@@ -767,18 +771,18 @@ function B(t, e) {
|
|
|
767
771
|
case "px":
|
|
768
772
|
return 1;
|
|
769
773
|
default: {
|
|
770
|
-
const [s,
|
|
774
|
+
const [s, o] = st(i);
|
|
771
775
|
if (isNaN(s))
|
|
772
776
|
return;
|
|
773
|
-
if (!
|
|
777
|
+
if (!o)
|
|
774
778
|
return s;
|
|
775
|
-
const r = B(
|
|
779
|
+
const r = B(o, e);
|
|
776
780
|
return typeof r == "number" ? s * r : void 0;
|
|
777
781
|
}
|
|
778
782
|
}
|
|
779
783
|
}
|
|
780
784
|
function k(t, e) {
|
|
781
|
-
const [n, i] =
|
|
785
|
+
const [n, i] = st(
|
|
782
786
|
getComputedStyle(t).getPropertyValue(e)
|
|
783
787
|
);
|
|
784
788
|
return n * (B(i, t) ?? 1);
|
|
@@ -791,52 +795,52 @@ function xe(t, e) {
|
|
|
791
795
|
}
|
|
792
796
|
var Se = /* @__PURE__ */ J("<div>");
|
|
793
797
|
const M = 1, we = typeof window == "object" && typeof document == "object" && document.nodeType === 9, je = (t) => {
|
|
794
|
-
const [e, n] = v(1), [i, s] = v(),
|
|
798
|
+
const [e, n] = v(1), [i, s] = v(), o = x();
|
|
795
799
|
return X(() => (Q(), 0)), U(() => {
|
|
796
|
-
const r =
|
|
800
|
+
const r = A(i());
|
|
797
801
|
if (r === void 0)
|
|
798
802
|
return;
|
|
799
|
-
const
|
|
803
|
+
const c = Y(r, ({
|
|
800
804
|
target: l
|
|
801
805
|
}) => {
|
|
802
806
|
n(1);
|
|
803
|
-
const a = t.gutter ? $(
|
|
807
|
+
const a = t.gutter ? $(o, 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
808
|
return n(P), 0;
|
|
805
809
|
});
|
|
806
|
-
return q(
|
|
810
|
+
return q(c), 0;
|
|
807
811
|
}), (() => {
|
|
808
812
|
var r = Se();
|
|
809
|
-
return
|
|
813
|
+
return K(s, r), p(r, () => t.children), w((c) => Z(r, `grid-row: span ${e()};`, c)), r;
|
|
810
814
|
})();
|
|
811
815
|
}, _e = (t) => {
|
|
812
|
-
const e =
|
|
816
|
+
const e = lt(() => t.children), i = [].concat(e()).filter(Boolean).map((s) => I(je, {
|
|
813
817
|
get gutter() {
|
|
814
818
|
return t.gutter;
|
|
815
819
|
},
|
|
816
820
|
children: s
|
|
817
821
|
}));
|
|
818
|
-
return I($e,
|
|
822
|
+
return I($e, d({
|
|
819
823
|
style: "grid-template-rows: 1px;"
|
|
820
824
|
}, t, {
|
|
821
825
|
children: i
|
|
822
826
|
}));
|
|
823
|
-
},
|
|
827
|
+
}, Ce = {
|
|
824
828
|
start: "justify:start",
|
|
825
829
|
end: "justify:end",
|
|
826
830
|
center: "justify:center",
|
|
827
831
|
"space-between": "justify:space-between",
|
|
828
832
|
"space-around": "justify:space-around"
|
|
829
|
-
},
|
|
833
|
+
}, Ae = {
|
|
830
834
|
start: "align:start",
|
|
831
835
|
end: "align:end",
|
|
832
836
|
center: "align:center",
|
|
833
837
|
stretch: "align:stretch"
|
|
834
838
|
};
|
|
835
839
|
function Fe(t) {
|
|
836
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.justify !== void 0 ?
|
|
837
|
-
return h(() => t.as ?? "div",
|
|
840
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.justify !== void 0 ? Ce[t.justify] : void 0, o = () => t.align !== void 0 ? Ae[t.align] : void 0, r = () => [n(), i()].join("; "), c = () => [s(), o()].filter(Boolean).join(" ");
|
|
841
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "justify", "align"]), g({
|
|
838
842
|
style: r,
|
|
839
|
-
"data-bedrock-inline-cluster":
|
|
843
|
+
"data-bedrock-inline-cluster": c
|
|
840
844
|
})));
|
|
841
845
|
}
|
|
842
846
|
const Ee = {
|
|
@@ -852,8 +856,8 @@ const Ee = {
|
|
|
852
856
|
stretch: "align:stretch"
|
|
853
857
|
};
|
|
854
858
|
function Ve(t) {
|
|
855
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((u, [b, S]) => u + `${b}:${S};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0,
|
|
856
|
-
return h(() => t.as ?? "div",
|
|
859
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((u, [b, S]) => u + `${b}:${S};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, o = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", r = () => t.justify !== void 0 ? Ee[t.justify] : void 0, c = () => t.align !== void 0 ? Ie[t.align] : void 0, l = () => t.stretch ? `stretch:${t.stretch}` : void 0, a = () => [n(), i(), o(), s()].join("; "), f = () => [r(), c(), l()].filter(Boolean).join(" ");
|
|
860
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "justify", "align", "stretch", "switchAt"]), g({
|
|
857
861
|
style: a,
|
|
858
862
|
"data-bedrock-inline": f
|
|
859
863
|
})));
|
|
@@ -872,23 +876,23 @@ const Te = (t) => ({
|
|
|
872
876
|
return "";
|
|
873
877
|
if (Array.isArray(e) && e.length > 4)
|
|
874
878
|
throw new Error("padding arrays can only be 4 or less in length");
|
|
875
|
-
const n = typeof e == "object" && !Array.isArray(e) ? Object.entries(e).reduce((i, [s,
|
|
879
|
+
const n = typeof e == "object" && !Array.isArray(e) ? Object.entries(e).reduce((i, [s, o]) => ({
|
|
876
880
|
...i,
|
|
877
|
-
[Te(s)]: _(t,
|
|
881
|
+
[Te(s)]: _(t, o) ?? "0px"
|
|
878
882
|
}), {}) : {
|
|
879
883
|
padding: Array.from(Array.isArray(e) ? e : [e]).map((i) => _(t, i) ?? "0px").join(" ")
|
|
880
884
|
};
|
|
881
|
-
return Object.entries(n).reduce((i, [s,
|
|
885
|
+
return Object.entries(n).reduce((i, [s, o]) => i + `${s}:${o};`, "");
|
|
882
886
|
};
|
|
883
887
|
function Xe(t) {
|
|
884
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((
|
|
885
|
-
return h(() => t.as ?? "div",
|
|
888
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [r, c]) => o + `${r}:${c};`, ""), i = () => ve(e, t.padding), s = () => [n(), i()].join("; ");
|
|
889
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "padding"]), g({
|
|
886
890
|
style: s,
|
|
887
891
|
"data-bedrock-padbox": () => ""
|
|
888
892
|
})));
|
|
889
893
|
}
|
|
890
894
|
function Ue(t) {
|
|
891
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [
|
|
895
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [c, l]) => r + `${c}:${l};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => {
|
|
892
896
|
switch (t.snapType) {
|
|
893
897
|
case "none":
|
|
894
898
|
return "snapType:none";
|
|
@@ -899,9 +903,9 @@ function Ue(t) {
|
|
|
899
903
|
default:
|
|
900
904
|
return "snapType:none";
|
|
901
905
|
}
|
|
902
|
-
},
|
|
903
|
-
return h(() => t.as ?? "div",
|
|
904
|
-
style:
|
|
906
|
+
}, o = () => [n(), i()].join("; ");
|
|
907
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "gutter"]), g({
|
|
908
|
+
style: o,
|
|
905
909
|
"data-bedrock-reel": s
|
|
906
910
|
})));
|
|
907
911
|
}
|
|
@@ -915,10 +919,10 @@ const F = {
|
|
|
915
919
|
"auto-end": "fraction:auto-end"
|
|
916
920
|
};
|
|
917
921
|
function qe(t) {
|
|
918
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", s = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`,
|
|
919
|
-
return h(() => t.as ?? "div",
|
|
920
|
-
style:
|
|
921
|
-
"data-bedrock-split":
|
|
922
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", s = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, o = () => F[t.fraction ?? "1/2"] ?? F["1/2"], r = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, c = () => [n(), s(), i(), r()].join("; ");
|
|
923
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "fraction"]), g({
|
|
924
|
+
style: c,
|
|
925
|
+
"data-bedrock-split": o
|
|
922
926
|
})));
|
|
923
927
|
}
|
|
924
928
|
const Oe = {
|
|
@@ -928,8 +932,8 @@ const Oe = {
|
|
|
928
932
|
stretch: "align:stretch"
|
|
929
933
|
};
|
|
930
934
|
function Qe(t) {
|
|
931
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((
|
|
932
|
-
return h(() => t.as ?? "div",
|
|
935
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => [n(), i()].join("; "), o = () => t.align !== void 0 ? Oe[t.align] : void 0, r = () => [o()].filter(Boolean).join(" ");
|
|
936
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "gutter"]), g({
|
|
933
937
|
style: s,
|
|
934
938
|
"data-bedrock-stack": r
|
|
935
939
|
})));
|
|
@@ -939,42 +943,42 @@ function Me(t) {
|
|
|
939
943
|
return typeof t == "number" ? `${t}px` : t && W(t) ? t : "100vh";
|
|
940
944
|
}
|
|
941
945
|
function ze(t) {
|
|
942
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((
|
|
943
|
-
return h(() => t.as ?? "div",
|
|
946
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minHeight: ${Me(t.minHeight)};`, o = () => t.variant === "stretch-content" || t.stretchContent === !0 ? "stretch-content" : "", r = () => [n(), i(), s()].join("; ");
|
|
947
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "minHeight", "stretchContent"]), g({
|
|
944
948
|
style: r,
|
|
945
|
-
"data-bedrock-cover":
|
|
949
|
+
"data-bedrock-cover": o
|
|
946
950
|
})));
|
|
947
951
|
}
|
|
948
952
|
function Ye(t) {
|
|
949
953
|
const [e, n] = V(t, ["children", "top", "bottom"]);
|
|
950
|
-
return I(ze,
|
|
954
|
+
return I(ze, d(n, {
|
|
951
955
|
get children() {
|
|
952
956
|
return [T(() => e.top), (() => {
|
|
953
957
|
var i = Pe();
|
|
954
|
-
return
|
|
958
|
+
return p(i, () => e.children), i;
|
|
955
959
|
})(), T(() => e.bottom)];
|
|
956
960
|
}
|
|
957
961
|
}));
|
|
958
962
|
}
|
|
959
963
|
function Je(t) {
|
|
960
|
-
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((
|
|
961
|
-
return h(() => t.as ?? "div",
|
|
964
|
+
const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--columns: ${A(Math.max(t.colCount ?? t.columns ?? 1, 1)) ?? 1};`, o = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", r = () => [n(), i(), s(), o()].filter(Boolean).join("; ");
|
|
965
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "columns", "colCount", "switchAt"]), g({
|
|
962
966
|
style: r,
|
|
963
967
|
"data-bedrock-columns": () => ""
|
|
964
968
|
})));
|
|
965
969
|
}
|
|
966
970
|
const Ne = (t) => typeof t == "number" ? t : 1;
|
|
967
971
|
function Ze(t) {
|
|
968
|
-
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [
|
|
969
|
-
return h(() => t.as ?? "div",
|
|
970
|
-
style:
|
|
972
|
+
const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [c, l]) => r + `${c}:${l};`, ""), n = () => `--span: ${Ne(t.span)};`, i = () => t.offsetStart && t.offsetStart > 0 ? `--offsetStart: ${t.offsetStart};` : "", s = () => t.offsetEnd && t.offsetEnd > 0 ? `--offsetEnd: ${t.offsetEnd};` : "", o = () => [e(), n(), i(), s()].join("; ");
|
|
973
|
+
return h(() => t.as ?? "div", d(m(t, ["as", "span", "offsetStart", "offsetEnd"]), g({
|
|
974
|
+
style: o,
|
|
971
975
|
"data-bedrock-column": () => ""
|
|
972
976
|
})));
|
|
973
977
|
}
|
|
974
978
|
export {
|
|
975
979
|
Be as Center,
|
|
976
980
|
Ze as Column,
|
|
977
|
-
|
|
981
|
+
Re as ColumnDrop,
|
|
978
982
|
Je as Columns,
|
|
979
983
|
Ye as Cover,
|
|
980
984
|
He as Frame,
|
|
@@ -986,7 +990,7 @@ export {
|
|
|
986
990
|
Ue as Reel,
|
|
987
991
|
qe as Split,
|
|
988
992
|
Qe as Stack,
|
|
989
|
-
|
|
993
|
+
De as ThemeProvider,
|
|
990
994
|
W as checkIsCSSLength,
|
|
991
995
|
Ge as createContainerQuery,
|
|
992
996
|
_ as getSafeGutter,
|
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(()=>me(e,t,n,!0,r,!0)),r}function ye(e,t,n){return a.untrack(()=>e(t,n))}function D(e,t,n,i){if(n!==void 0&&!i&&(i=[]),typeof t!="function")return j(e,t,i,n);a.createRenderEffect(r=>j(e,t(),r,n),i)}function me(e,t,n,i,r={},o=!1){t||(t={});for(const s in r)if(!(s in t)){if(s==="children")continue;r[s]=H(e,s,null,r[s],n,o)}for(const s in t){if(s==="children"){i||j(e,t.children);continue}const c=t[s];r[s]=H(e,s,c,r[s],n,o)}}function he(e){let t,n;return!a.sharedConfig.context||!(t=a.sharedConfig.registry.get(n=Ce()))?e():(a.sharedConfig.completed&&a.sharedConfig.completed.add(t),a.sharedConfig.registry.delete(n),t)}function be(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function G(e,t,n){const i=t.trim().split(/\s+/);for(let r=0,o=i.length;r<o;r++)e.classList.toggle(i[r],n)}function H(e,t,n,i,r,o){let s,c,f,l,d;if(t==="style")return R(e,n,i);if(t==="classList")return de(e,n,i);if(n===i)return i;if(t==="ref")o||n(e);else if(t.slice(0,3)==="on:"){const g=t.slice(3);i&&e.removeEventListener(g,i),n&&e.addEventListener(g,n)}else if(t.slice(0,10)==="oncapture:"){const g=t.slice(10);i&&e.removeEventListener(g,i,!0),n&&e.addEventListener(g,n,!0)}else if(t.slice(0,2)==="on"){const g=t.slice(2).toLowerCase(),C=re.has(g);if(!C&&i){const S=Array.isArray(i)?i[0]:i;e.removeEventListener(g,S)}(C||n)&&(ue(e,g,n,C),C&&ae([g]))}else if(t.slice(0,5)==="attr:")M(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(f=ee.has(t))||!r&&((l=ie(t,e.tagName))||(c=J.has(t)))||(s=e.nodeName.includes("-"))){if(d)t=t.slice(5),c=!0;else if(a.sharedConfig.context)return n;t==="class"||t==="className"?le(e,n):s&&!c&&!f?e[be(t)]=n:e[l||t]=n}else{const g=r&&t.indexOf(":")>-1&&oe[t.split(":")[0]];g?fe(e,g,t,n):M(e,te[t]||t,n)}return n}function $e(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),a.sharedConfig.registry&&!a.sharedConfig.done&&(a.sharedConfig.done=_$HY.done=!0);n;){const i=n[t];if(i&&!n.disabled){const r=n[`${t}Data`];if(r!==void 0?i.call(n,r,e):i.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function j(e,t,n,i,r){if(a.sharedConfig.context){!n&&(n=[...e.childNodes]);let c=[];for(let f=0;f<n.length;f++){const l=n[f];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():c.push(l)}n=c}for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,s=i!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(a.sharedConfig.context)return n;if(o==="number"&&(t=t.toString()),s){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=w(e,n,i,c)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(a.sharedConfig.context)return n;n=w(e,n,i)}else{if(o==="function")return a.createRenderEffect(()=>{let c=t();for(;typeof c=="function";)c=c();n=j(e,c,n,i)}),()=>n;if(Array.isArray(t)){const c=[],f=n&&Array.isArray(n);if(v(c,t,n,r))return a.createRenderEffect(()=>n=j(e,c,n,i,!0)),()=>n;if(a.sharedConfig.context){if(!c.length)return n;if(i===void 0)return[...e.childNodes];let l=c[0],d=[l];for(;(l=l.nextSibling)!==i;)d.push(l);return n=d}if(c.length===0){if(n=w(e,n,i),s)return n}else f?n.length===0?_(e,c,i):se(e,n,c):(n&&w(e),_(e,c));n=c}else if(t.nodeType){if(a.sharedConfig.context&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=w(e,n,i,t);w(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function v(e,t,n,i){let r=!1;for(let o=0,s=t.length;o<s;o++){let c=t[o],f=n&&n[e.length],l;if(!(c==null||c===!0||c===!1))if((l=typeof c)=="object"&&c.nodeType)e.push(c);else if(Array.isArray(c))r=v(e,c,f)||r;else if(l==="function")if(i){for(;typeof c=="function";)c=c();r=v(e,Array.isArray(c)?c:[c],Array.isArray(f)?f:[f])||r}else e.push(c),r=!0;else{const d=String(c);f&&f.nodeType===3&&f.data===d?e.push(f):e.push(document.createTextNode(d))}}return r}function _(e,t,n=null){for(let i=0,r=t.length;i<r;i++)e.insertBefore(t[i],n)}function w(e,t,n,i){if(n===void 0)return e.textContent="";const r=i||document.createTextNode("");if(t.length){let o=!1;for(let s=t.length-1;s>=0;s--){const c=t[s];if(r!==c){const f=c.parentNode===e;!o&&!s?f?e.replaceChild(r,c):e.insertBefore(r,n):f&&c.remove()}else o=!0}}else e.insertBefore(r,n);return[r]}function Ce(){const e=a.sharedConfig.context;return`${e.id}${e.count++}`}const Se="http://www.w3.org/2000/svg";function je(e,t=!1){return t?document.createElementNS(Se,e):document.createElement(e)}function we(e){const[t,n]=a.splitProps(e,["component"]),i=a.createMemo(()=>t.component);return a.createMemo(()=>{const r=i();switch(typeof r){case"function":return a.untrack(()=>r(n));case"string":const o=ce.has(r),s=a.sharedConfig.context?he():je(r,o);return ge(s,n,o),s}})}function x(e){return e??void 0}function y(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,i)=>Object.defineProperty({...n},i,{get(){return e[i]},configurable:!0,enumerable:!0}),{})}function m(e,t){return a.createComponent(we,a.mergeProps({get component(){return e()}},t))}function h(e){return Object.values(e).every(t=>typeof t=="function")?Object.keys(e).reduce((t,n)=>{const i=e[n];return Object.defineProperty(t,n,{get(){return i()},configurable:!0,enumerable:!0})},{}):new Error("Please provide an object with accessor values only.")}const F=/^--\D{1}.{0,100}$/;function V(e){return F.test(e)}function I(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1}.{0,100}\)$/,F].some(t=>t.test(e))}const{sizeXxs:xe,sizeXs:Ae,sizeSm:Pe,sizeMd:Ee,sizeLg:Te,sizeXl:Ie,sizeXxl:Me,sizeContent1:ve,sizeContent2:Oe,sizeContent3:ze,sizeHeader1:ke,sizeHeader2:Ne,sizeHeader3:Le,size000:We,size00:Be,size1:Re,size2:De,size3:Ge,size4:He,size5:_e,size6:Fe,size7:Ve,size8:Xe,size9:qe,size10:Ue,size11:Qe,size12:Ye,size13:Ze,size14:Ke,size15:pe}=A,Je={size000:We,size00:Be,size1:Re,size2:De,size3:Ge,size4:He,size5:_e,size6:Fe,size7:Ve,size8:Xe,size9:qe,size10:Ue,size11:Qe,size12:Ye,size13:Ze,size14:Ke,size15:pe},et={sizeXxs:xe,sizeXs:Ae,sizeSm:Pe,sizeMd:Ee,sizeLg:Te,sizeXl:Ie,sizeXxl:Me,sizeContent1:ve,sizeContent2:Oe,sizeContent3:ze,sizeHeader1:ke,sizeHeader2:Ne,sizeHeader3:Le},X=Je,q=et;function U(e){return e.reduce((t,[n,i])=>({...t,[n]:i}),{})}function O(e,t){if(t!==void 0)return typeof t=="number"&&t>=0?`${t}px`:typeof t=="string"&&I(t)?V(t)?`var(${t})`:t:x(b(e,t))}function b(e,t){const n=e.space??X,i=U(Object.entries(n).map(([r,o])=>[r,typeof o=="number"?`${o}px`:o]));return x(i[t])}function P(e,t){if(t===void 0)return;if(typeof t=="number"&&t>=0)return`${t}px`;if(typeof t=="string"&&I(t))return V(t)?`var(${t})`:t;const n=e.sizes??q,i=U(Object.entries(n).map(([r,o])=>[r,typeof o=="number"?`${o}px`:o]));return x(i[t])}function tt(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}function nt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),n=()=>`--maxWidth: ${tt(e.maxWidth)};`,i=()=>e.centerText?"center-text":"",r=()=>e.centerChildren?"center-children":"",o=()=>[i(),r()].filter(Boolean).join(" "),s=()=>[t(),n()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","maxWidth","centerText","centerChildren"]),h({style:s,"data-bedrock-center":o})))}const Q=a.createContext({});function it(e){return a.createComponent(Q.Provider,{get value(){return e.theme},get children(){return e.children}})}function $(){try{return a.useContext(Q)}catch{return{}}}function rt(e,t){return P(e,t)}function ct(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--minItemWidth: ${rt(t,e.minItemWidth)}`,o=()=>e.noStretchedColumns===!0?"no-stretched-columns":"",s=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","minItemWidth","noStretchedColumns"]),h({style:s,"data-bedrock-column-drop":o})))}function ot(e,t){const[n,i]=a.createSignal(!1),[r,o]=a.createSignal();return a.onMount(()=>{T.init()}),a.createEffect(()=>{if(x(r())===void 0)return;t&&t(r());const s=T.registerCallback(r(),c=>{var l;const f=((l=c.borderBoxSize)==null?void 0:l.inlineSize)??c.contentRect.width;if(f>0){const d=f<=e;i(d)}});a.onCleanup(s)}),[n,o]}function st(e){return Array.isArray(e)&&e.length===2&&e.every(Number.isFinite)||typeof e=="string"&&/^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e)}function at(e){return Array.isArray(e)?e.join("/"):e}function ft(e){return st(e)?at(e):void 0}function lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),n=()=>ft(e.ratio),i=()=>n()?`--ratio: ${n()}`:"",r=()=>typeof e.position=="string"?`--position: ${e.position}`:"50%",o=()=>[t(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","ratio","position"]),h({style:o,"data-bedrock-frame":()=>""})))}function Y(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth??0}px`};`,o=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","minItemWidth"]),h({style:o,"data-bedrock-grid":()=>e.variant==="masonry"?"variant:masonry":""})))}const E=96;function Z(e){const t=String(e),n=parseFloat(t),[,i]=t.match(/[\d.\-+]*\s*(.*)/)??["",""];return[n,i]}function z(e,t){if(!e)return;const n=t??document.body,i=(e??"px").trim().toLowerCase();switch(i){case"vmin":case"vmax":case"vh":case"vw":case"%":return;case"ch":case"ex":return ut(i,n);case"em":return k(n,"font-size");case"rem":return k(document.body,"font-size");case"in":return E;case"cm":return E/2.54;case"mm":return E/25.4;case"pt":return E/72;case"pc":return E/6;case"px":return 1;default:{const[r,o]=Z(i);if(isNaN(r))return;if(!o)return r;const s=z(o,t);return typeof s=="number"?r*s:void 0}}}function k(e,t){const[n,i]=Z(getComputedStyle(e).getPropertyValue(t));return n*(z(i,e)??1)}function ut(e,t){const n=document.createElement("div");n.style.height="128"+e,t.appendChild(n);const i=k(n,"height")/128;return t.removeChild(n),i}var dt=B("<div>");const N=1,gt=typeof window=="object"&&typeof document=="object"&&document.nodeType===9,yt=e=>{const[t,n]=a.createSignal(1),[i,r]=a.createSignal(),o=$();return a.onMount(()=>(T.init(),0)),a.createEffect(()=>{const s=x(i());if(s===void 0)return;const c=T.registerCallback(s,({target:f})=>{n(1);const l=e.gutter?b(o,e.gutter)??"1px":"1px",d=gt?z(l,f):void 0,g=Math.max(d??N,N),[C]=Array.from(f.children),S=1+Math.min(f.scrollHeight,C.scrollHeight),L=Math.max(Math.ceil(S/g),N);return n(L),0});return a.onCleanup(c),0}),(()=>{var s=dt();return ye(r,s),D(s,()=>e.children),a.createRenderEffect(c=>R(s,`grid-row: span ${t()};`,c)),s})()},mt=e=>{const t=a.children(()=>e.children),i=[].concat(t()).filter(Boolean).map(r=>a.createComponent(yt,{get gutter(){return e.gutter},children:r}));return a.createComponent(Y,a.mergeProps({style:"grid-template-rows: 1px;"},e,{children:i}))},ht={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},bt={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function $t(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((f,[l,d])=>f+`${l}:${d};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>e.justify!==void 0?ht[e.justify]:void 0,o=()=>e.align!==void 0?bt[e.align]:void 0,s=()=>[n(),i()].join("; "),c=()=>[r(),o()].filter(Boolean).join(" ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","justify","align"]),h({style:s,"data-bedrock-inline-cluster":c})))}const Ct={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},St={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function jt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((g,[C,S])=>g+`${C}:${S};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,o=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",s=()=>e.justify!==void 0?Ct[e.justify]:void 0,c=()=>e.align!==void 0?St[e.align]:void 0,f=()=>e.stretch?`stretch:${e.stretch}`:void 0,l=()=>[n(),i(),o(),r()].join("; "),d=()=>[s(),c(),f()].filter(Boolean).join(" ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","justify","align","stretch","switchAt"]),h({style:l,"data-bedrock-inline":d})))}const wt=e=>({left:"padding-inline-start",right:"padding-inline-end",top:"padding-block-start",bottom:"padding-block-end",inlineStart:"padding-inline-start",inlineEnd:"padding-inline-end",blockStart:"padding-block-start",blockEnd:"padding-block-end"})[e],xt=(e,t)=>{if(!t)return"";if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((i,[r,o])=>({...i,[wt(r)]:O(e,o)??"0px"}),{}):{padding:Array.from(Array.isArray(t)?t:[t]).map(i=>O(e,i)??"0px").join(" ")};return Object.entries(n).reduce((i,[r,o])=>i+`${r}:${o};`,"")};function At(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[s,c])=>o+`${s}:${c};`,""),i=()=>xt(t,e.padding),r=()=>[n(),i()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","padding"]),h({style:r,"data-bedrock-padbox":()=>""})))}function Pt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>{switch(e.snapType){case"none":return"snapType:none";case"proximity":return"snapType:proximity";case"mandatory":return"snapType:mandatory";default:return"snapType:none"}},o=()=>[n(),i()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter"]),h({style:o,"data-bedrock-reel":r})))}const K={"1/4":"fraction:1/4","1/3":"fraction:1/3","1/2":"fraction:1/2","2/3":"fraction:2/3","3/4":"fraction:3/4","auto-start":"fraction:auto-start","auto-end":"fraction:auto-end"};function Et(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((f,[l,d])=>f+`${l}:${d};`,""),i=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",r=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,o=()=>K[e.fraction??"1/2"]??K["1/2"],s=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,c=()=>[n(),r(),i(),s()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","fraction"]),h({style:c,"data-bedrock-split":o})))}const Tt={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function It(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>[n(),i()].join("; "),o=()=>e.align!==void 0?Tt[e.align]:void 0,s=()=>[o()].filter(Boolean).join(" ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter"]),h({style:r,"data-bedrock-stack":s})))}var Mt=B("<div data-bedrock-cover-centered>");function vt(e){return typeof e=="number"?`${e}px`:e&&I(e)?e:"100vh"}function Ot(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--minHeight: ${vt(e.minHeight)};`,o=()=>e.stretchContent===!0?"stretch-content":"",s=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","minHeight","stretchContent"]),h({style:s,"data-bedrock-cover":o})))}function zt(e){const[t,n]=a.splitProps(e,["children","top","bottom"]);return a.createComponent(Ot,a.mergeProps(n,{get children(){return[a.createMemo(()=>t.top),(()=>{var i=Mt();return D(i,()=>t.children),i})(),a.createMemo(()=>t.bottom)]}}))}function kt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[f,l])=>c+`${f}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--columns: ${x(Math.max(e.colCount??e.columns??1,1))??1};`,o=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",s=()=>[n(),i(),r(),o()].filter(Boolean).join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","gutter","columns","colCount","switchAt"]),h({style:s,"data-bedrock-columns":()=>""})))}const Nt=e=>typeof e=="number"?e:1;function Lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[c,f])=>s+`${c}:${f};`,""),n=()=>`--span: ${Nt(e.span)};`,i=()=>e.offsetStart&&e.offsetStart>0?`--offsetStart: ${e.offsetStart};`:"",r=()=>e.offsetEnd&&e.offsetEnd>0?`--offsetEnd: ${e.offsetEnd};`:"",o=()=>[t(),n(),i(),r()].join("; ");return m(()=>e.as??"div",a.mergeProps(y(e,["as","span","offsetStart","offsetEnd"]),h({style:o,"data-bedrock-column":()=>""})))}u.Center=nt,u.Column=Lt,u.ColumnDrop=ct,u.Columns=kt,u.Cover=zt,u.Frame=lt,u.Grid=Y,u.Inline=jt,u.InlineCluster=$t,u.MasonryGrid=mt,u.PadBox=At,u.Reel=Pt,u.Split=Et,u.Stack=It,u.ThemeProvider=it,u.checkIsCSSLength=I,u.createContainerQuery=ot,u.getSafeGutter=O,u.getSizeValue=P,u.getSpacingValue=b,u.sizes=q,u.spacing=X,u.useTheme=$,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(d,x){typeof exports=="object"&&typeof module<"u"?x(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"],x):(d=typeof globalThis<"u"?globalThis:d||self,x(d.solid={},d.OpenProps,d.solidJs,d.registerResizeCallback))})(this,function(d,x,f,T){"use strict";const J=["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"],ee=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...J]),te=new Set(["innerHTML","textContent","innerText","children"]),ne=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),ie=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 re(e,t){const n=ie[e];return typeof n=="object"?n[t]?n.$:void 0:n}const ce=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),oe=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","feDropShadow","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"]),se={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function ae(e,t,n){let i=n.length,r=t.length,c=i,s=0,o=0,a=t[r-1].nextSibling,l=null;for(;s<r||o<c;){if(t[s]===n[o]){s++,o++;continue}for(;t[r-1]===n[c-1];)r--,c--;if(r===s){const u=c<i?o?n[o-1].nextSibling:n[c-o]:a;for(;o<c;)e.insertBefore(n[o++],u)}else if(c===o)for(;s<r;)(!l||!l.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[c-1]&&n[o]===t[r-1]){const u=t[--r].nextSibling;e.insertBefore(n[o++],t[s++].nextSibling),e.insertBefore(n[--c],u),t[r]=n[c]}else{if(!l){l=new Map;let g=o;for(;g<c;)l.set(n[g],g++)}const u=l.get(t[s]);if(u!=null)if(o<u&&u<c){let g=s,C=1,S;for(;++g<r&&g<c&&!((S=l.get(t[g]))==null||S!==u+C);)C++;if(C>u-o){const L=t[s];for(;o<u;)e.insertBefore(n[o++],L)}else e.replaceChild(n[o++],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},c=t?()=>f.untrack(()=>document.importNode(i||(i=r()),!0)):()=>(i||(i=r())).cloneNode(!0);return c.cloneNode=c,c}function fe(e,t=window.document){const n=t[W]||(t[W]=new Set);for(let i=0,r=e.length;i<r;i++){const c=e[i];n.has(c)||(n.add(c),t.addEventListener(c,$e))}}function M(e,t,n){f.sharedConfig.context&&e.isConnected||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function le(e,t,n,i){f.sharedConfig.context&&e.isConnected||(i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i))}function ue(e,t){f.sharedConfig.context&&e.isConnected||(t==null?e.removeAttribute("class"):e.className=t)}function de(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]=c=>r.call(e,n[1],c))}else e.addEventListener(t,n)}function ge(e,t,n={}){const i=Object.keys(t||{}),r=Object.keys(n);let c,s;for(c=0,s=r.length;c<s;c++){const o=r[c];!o||o==="undefined"||t[o]||(H(e,o,!1),delete n[o])}for(c=0,s=i.length;c<s;c++){const o=i[c],a=!!t[o];!o||o==="undefined"||n[o]===a||!a||(H(e,o,!0),n[o]=a)}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,c;for(c in n)t[c]==null&&i.removeProperty(c),delete n[c];for(c in t)r=t[c],r!==n[c]&&(i.setProperty(c,r),n[c]=r);return n}function ye(e,t={},n,i){const r={};return i||f.createRenderEffect(()=>r.children=j(e,t.children,r.children)),f.createRenderEffect(()=>typeof t.ref=="function"?D(t.ref,e):t.ref=e),f.createRenderEffect(()=>me(e,t,n,!0,r,!0)),r}function D(e,t,n){return f.untrack(()=>e(t,n))}function G(e,t,n,i){if(n!==void 0&&!i&&(i=[]),typeof t!="function")return j(e,t,i,n);f.createRenderEffect(r=>j(e,t(),r,n),i)}function me(e,t,n,i,r={},c=!1){t||(t={});for(const s in r)if(!(s in t)){if(s==="children")continue;r[s]=_(e,s,null,r[s],n,c)}for(const s in t){if(s==="children"){i||j(e,t.children);continue}const o=t[s];r[s]=_(e,s,o,r[s],n,c)}}function he(e){let t,n;return!f.sharedConfig.context||!(t=f.sharedConfig.registry.get(n=Ce()))?e():(f.sharedConfig.completed&&f.sharedConfig.completed.add(t),f.sharedConfig.registry.delete(n),t)}function be(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function H(e,t,n){const i=t.trim().split(/\s+/);for(let r=0,c=i.length;r<c;r++)e.classList.toggle(i[r],n)}function _(e,t,n,i,r,c){let s,o,a,l,u;if(t==="style")return R(e,n,i);if(t==="classList")return ge(e,n,i);if(n===i)return i;if(t==="ref")c||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=ce.has(g);if(!C&&i){const S=Array.isArray(i)?i[0]:i;e.removeEventListener(g,S)}(C||n)&&(de(e,g,n,C),C&&fe([g]))}else if(t.slice(0,5)==="attr:")M(e,t.slice(5),n);else if((u=t.slice(0,5)==="prop:")||(a=te.has(t))||!r&&((l=re(t,e.tagName))||(o=ee.has(t)))||(s=e.nodeName.includes("-"))){if(u)t=t.slice(5),o=!0;else if(f.sharedConfig.context&&e.isConnected)return n;t==="class"||t==="className"?ue(e,n):s&&!o&&!a?e[be(t)]=n:e[l||t]=n}else{const g=r&&t.indexOf(":")>-1&&se[t.split(":")[0]];g?le(e,g,t,n):M(e,ne[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}}),f.sharedConfig.registry&&!f.sharedConfig.done&&(f.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){const c=!!f.sharedConfig.context&&e.isConnected;if(c){!n&&(n=[...e.childNodes]);let a=[];for(let l=0;l<n.length;l++){const u=n[l];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():a.push(u)}n=a}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,o=i!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(c)return n;if(s==="number"&&(t=t.toString()),o){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=w(e,n,i,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(c)return n;n=w(e,n,i)}else{if(s==="function")return f.createRenderEffect(()=>{let a=t();for(;typeof a=="function";)a=a();n=j(e,a,n,i)}),()=>n;if(Array.isArray(t)){const a=[],l=n&&Array.isArray(n);if(v(a,t,n,r))return f.createRenderEffect(()=>n=j(e,a,n,i,!0)),()=>n;if(c){if(!a.length)return n;if(i===void 0)return[...e.childNodes];let u=a[0],g=[u];for(;(u=u.nextSibling)!==i;)g.push(u);return n=g}if(a.length===0){if(n=w(e,n,i),o)return n}else l?n.length===0?F(e,a,i):ae(e,n,a):(n&&w(e),F(e,a));n=a}else if(t.nodeType){if(c&&t.parentNode)return n=o?[t]:t;if(Array.isArray(n)){if(o)return n=w(e,n,i,t);w(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function v(e,t,n,i){let r=!1;for(let c=0,s=t.length;c<s;c++){let o=t[c],a=n&&n[e.length],l;if(!(o==null||o===!0||o===!1))if((l=typeof o)=="object"&&o.nodeType)e.push(o);else if(Array.isArray(o))r=v(e,o,a)||r;else if(l==="function")if(i){for(;typeof o=="function";)o=o();r=v(e,Array.isArray(o)?o:[o],Array.isArray(a)?a:[a])||r}else e.push(o),r=!0;else{const u=String(o);a&&a.nodeType===3&&a.data===u?e.push(a):e.push(document.createTextNode(u))}}return r}function F(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 c=!1;for(let s=t.length-1;s>=0;s--){const o=t[s];if(r!==o){const a=o.parentNode===e;!c&&!s?a?e.replaceChild(r,o):e.insertBefore(r,n):a&&o.remove()}else c=!0}}else e.insertBefore(r,n);return[r]}function Ce(){const e=f.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]=f.splitProps(e,["component"]),i=f.createMemo(()=>t.component);return f.createMemo(()=>{const r=i();switch(typeof r){case"function":return f.untrack(()=>r(n));case"string":const c=oe.has(r),s=f.sharedConfig.context?he():je(r,c);return ye(s,n,c),s}})}function A(e){return e??void 0}function y(e,t){return Object.keys(e).filter(n=>!t.includes(n)).reduce((n,i)=>Object.defineProperty({...n},i,{get(){return e[i]},configurable:!0,enumerable:!0}),{})}function m(e,t){return f.createComponent(we,f.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 V=/^--\D{1}.{0,100}$/;function X(e){return V.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}\)$/,V].some(t=>t.test(e))}const{sizeXxs:Ae,sizeXs:xe,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}=x,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:Ae,sizeXs:xe,sizeSm:Pe,sizeMd:Ee,sizeLg:Te,sizeXl:Ie,sizeXxl:Me,sizeContent1:ve,sizeContent2:Oe,sizeContent3:ze,sizeHeader1:ke,sizeHeader2:Ne,sizeHeader3:Le},q=Je,U=et;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"&&I(t)?X(t)?`var(${t})`:t:A(b(e,t))}function b(e,t){const n=e.space??q,i=Q(Object.entries(n).map(([r,c])=>[r,typeof c=="number"?`${c}px`:c]));return A(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 X(t)?`var(${t})`:t;const n=e.sizes??U,i=Q(Object.entries(n).map(([r,c])=>[r,typeof c=="number"?`${c}px`:c]));return A(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((o,[a,l])=>o+`${a}:${l};`,""),n=()=>`--maxWidth: ${tt(e.maxWidth)};`,i=()=>e.centerText?"center-text":"",r=()=>e.centerChildren?"center-children":"",c=()=>[i(),r()].filter(Boolean).join(" "),s=()=>[t(),n()].join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","maxWidth","centerText","centerChildren"]),h({style:s,"data-bedrock-center":c})))}const Y=f.createContext({});function it(e){return f.createComponent(Y.Provider,{get value(){return e.theme},get children(){return e.children}})}function $(){try{return f.useContext(Y)}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((o,[a,l])=>o+`${a}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--minItemWidth: ${rt(t,e.minItemWidth)}`,c=()=>e.noStretchedColumns===!0?"no-stretched-columns":"",s=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","gutter","minItemWidth","noStretchedColumns"]),h({style:s,"data-bedrock-column-drop":c})))}function ot(e,t){const[n,i]=f.createSignal(!1),[r,c]=f.createSignal();return f.onMount(()=>{T.init()}),f.createEffect(()=>{if(A(r())===void 0)return;t&&t(r());const s=T.registerCallback(r(),o=>{var l;const a=((l=o.borderBoxSize)==null?void 0:l.inlineSize)??o.contentRect.width;if(a>0){const u=a<=e;i(u)}});f.onCleanup(s)}),[n,c]}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,[o,a])=>s+`${o}:${a};`,""),n=()=>ft(e.ratio),i=()=>n()?`--ratio: ${n()}`:"",r=()=>typeof e.position=="string"?`--position: ${e.position}`:"50%",c=()=>[t(),i(),r()].join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","ratio","position"]),h({style:c,"data-bedrock-frame":()=>""})))}function Z(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[o,a])=>s+`${o}:${a};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth??0}px`};`,c=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","gutter","minItemWidth"]),h({style:c,"data-bedrock-grid":()=>e.variant==="masonry"?"variant:masonry":""})))}const E=96;function K(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,c]=K(i);if(isNaN(r))return;if(!c)return r;const s=z(c,t);return typeof s=="number"?r*s:void 0}}}function k(e,t){const[n,i]=K(getComputedStyle(e).getPropertyValue(t));return n*(z(i,e)??1)}function ut(e,t){const n=document.createElement("div");n.style.height="128"+e,t.appendChild(n);const i=k(n,"height")/128;return t.removeChild(n),i}var dt=B("<div>");const N=1,gt=typeof window=="object"&&typeof document=="object"&&document.nodeType===9,yt=e=>{const[t,n]=f.createSignal(1),[i,r]=f.createSignal(),c=$();return f.onMount(()=>(T.init(),0)),f.createEffect(()=>{const s=A(i());if(s===void 0)return;const o=T.registerCallback(s,({target:a})=>{n(1);const l=e.gutter?b(c,e.gutter)??"1px":"1px",u=gt?z(l,a):void 0,g=Math.max(u??N,N),[C]=Array.from(a.children),S=1+Math.min(a.scrollHeight,C.scrollHeight),L=Math.max(Math.ceil(S/g),N);return n(L),0});return f.onCleanup(o),0}),(()=>{var s=dt();return D(r,s),G(s,()=>e.children),f.createRenderEffect(o=>R(s,`grid-row: span ${t()};`,o)),s})()},mt=e=>{const t=f.children(()=>e.children),i=[].concat(t()).filter(Boolean).map(r=>f.createComponent(yt,{get gutter(){return e.gutter},children:r}));return f.createComponent(Z,f.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((a,[l,u])=>a+`${l}:${u};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>e.justify!==void 0?ht[e.justify]:void 0,c=()=>e.align!==void 0?bt[e.align]:void 0,s=()=>[n(),i()].join("; "),o=()=>[r(),c()].filter(Boolean).join(" ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","gutter","justify","align"]),h({style:s,"data-bedrock-inline-cluster":o})))}const Ct={start:"justify:start",end:"justify:end",center:"justify:center","space-between":"justify:space-between","space-around":"justify:space-around"},St={start:"align:start",end:"align:end",center:"align:center",stretch:"align:stretch"};function jt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((g,[C,S])=>g+`${C}:${S};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,c=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",s=()=>e.justify!==void 0?Ct[e.justify]:void 0,o=()=>e.align!==void 0?St[e.align]:void 0,a=()=>e.stretch?`stretch:${e.stretch}`:void 0,l=()=>[n(),i(),c(),r()].join("; "),u=()=>[s(),o(),a()].filter(Boolean).join(" ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","gutter","justify","align","stretch","switchAt"]),h({style:l,"data-bedrock-inline":u})))}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],At=(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,c])=>({...i,[wt(r)]:O(e,c)??"0px"}),{}):{padding:Array.from(Array.isArray(t)?t:[t]).map(i=>O(e,i)??"0px").join(" ")};return Object.entries(n).reduce((i,[r,c])=>i+`${r}:${c};`,"")};function xt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((c,[s,o])=>c+`${s}:${o};`,""),i=()=>At(t,e.padding),r=()=>[n(),i()].join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","padding"]),h({style:r,"data-bedrock-padbox":()=>""})))}function Pt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[o,a])=>s+`${o}:${a};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>{switch(e.snapType){case"none":return"snapType:none";case"proximity":return"snapType:proximity";case"mandatory":return"snapType:mandatory";default:return"snapType:none"}},c=()=>[n(),i()].join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","gutter"]),h({style:c,"data-bedrock-reel":r})))}const p={"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((a,[l,u])=>a+`${l}:${u};`,""),i=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",r=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,c=()=>p[e.fraction??"1/2"]??p["1/2"],s=()=>e.minItemWidth?`--minItemWidth: ${typeof e.minItemWidth=="string"?e.minItemWidth:`${e.minItemWidth}px`};`:void 0,o=()=>[n(),r(),i(),s()].join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","gutter","fraction"]),h({style:o,"data-bedrock-split":c})))}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((o,[a,l])=>o+`${a}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>[n(),i()].join("; "),c=()=>e.align!==void 0?Tt[e.align]:void 0,s=()=>[c()].filter(Boolean).join(" ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","gutter"]),h({style:r,"data-bedrock-stack":s})))}var Mt=B("<div data-bedrock-cover-centered>");function vt(e){return typeof e=="number"?`${e}px`:e&&I(e)?e:"100vh"}function Ot(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[a,l])=>o+`${a}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--minHeight: ${vt(e.minHeight)};`,c=()=>e.variant==="stretch-content"||e.stretchContent===!0?"stretch-content":"",s=()=>[n(),i(),r()].join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","minHeight","stretchContent"]),h({style:s,"data-bedrock-cover":c})))}function zt(e){const[t,n]=f.splitProps(e,["children","top","bottom"]);return f.createComponent(Ot,f.mergeProps(n,{get children(){return[f.createMemo(()=>t.top),(()=>{var i=Mt();return G(i,()=>t.children),i})(),f.createMemo(()=>t.bottom)]}}))}function kt(e){const t=$(),n=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((o,[a,l])=>o+`${a}:${l};`,""),i=()=>`--gutter: ${b(t,e.gap??e.gutter??"size00")??"0px"}`,r=()=>`--columns: ${A(Math.max(e.colCount??e.columns??1,1))??1};`,c=()=>e.switchAt?`--switchAt: ${P(t,e.switchAt)??"0px"};`:"",s=()=>[n(),i(),r(),c()].filter(Boolean).join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","gutter","columns","colCount","switchAt"]),h({style:s,"data-bedrock-columns":()=>""})))}const Nt=e=>typeof e=="number"?e:1;function Lt(e){const t=()=>typeof e.style=="string"?e.style:Object.entries(e.style??{}).reduce((s,[o,a])=>s+`${o}:${a};`,""),n=()=>`--span: ${Nt(e.span)};`,i=()=>e.offsetStart&&e.offsetStart>0?`--offsetStart: ${e.offsetStart};`:"",r=()=>e.offsetEnd&&e.offsetEnd>0?`--offsetEnd: ${e.offsetEnd};`:"",c=()=>[t(),n(),i(),r()].join("; ");return m(()=>e.as??"div",f.mergeProps(y(e,["as","span","offsetStart","offsetEnd"]),h({style:c,"data-bedrock-column":()=>""})))}d.Center=nt,d.Column=Lt,d.ColumnDrop=ct,d.Columns=kt,d.Cover=zt,d.Frame=lt,d.Grid=Z,d.Inline=jt,d.InlineCluster=$t,d.MasonryGrid=mt,d.PadBox=xt,d.Reel=Pt,d.Split=Et,d.Stack=It,d.ThemeProvider=it,d.checkIsCSSLength=I,d.createContainerQuery=ot,d.getSafeGutter=O,d.getSizeValue=P,d.getSpacingValue=b,d.sizes=U,d.spacing=q,d.useTheme=$,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bedrock-layout/solid",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
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,
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"solid-js": "^1.3.7"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@bedrock-layout/register-resize-callback": "^2.0.
|
|
59
|
+
"@bedrock-layout/register-resize-callback": "^2.0.12"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"test": "echo \"Error: run tests from root\" && exit 1",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"bugs": {
|
|
72
72
|
"url": "https://github.com/Bedrock-Layouts/Solid-Bedrock/issues"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "7339d1a74ef75f45c11a13c1bd31bab6fbeedc57"
|
|
75
75
|
}
|