najwer23morsels 0.15.7 → 0.15.8

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.
Files changed (2) hide show
  1. package/lib/Picture.js +1 -1
  2. package/package.json +1 -1
package/lib/Picture.js CHANGED
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as r}from"react";import{u as t}from"./useWindowSize-CAQRbyxi.js";import{T as o}from"./TextBox-dHL75Jj9.js";import{g as a}from"./getCssVariableStyle-CBKDTT0s.js";import{s as c}from"./style-inject.es-BnTDb6vU.js";var d={n23mPictureFigure:"Picture-module_n23mPictureFigure__uStTO",n23mPicture:"Picture-module_n23mPicture__LpndY",border:"Picture-module_border__yjTpQ",loaded:"Picture-module_loaded__fpjpQ"};c("@layer n23mPicture{.Picture-module_n23mPictureFigure__uStTO{margin:0;padding:0}.Picture-module_n23mPicture__LpndY{box-sizing:border-box;display:block;&.Picture-module_border__yjTpQ{border:2px solid var(--picture-bc);padding:5px}& img{display:grid;height:auto;max-height:var(--picture-mh,unset);opacity:0;transition:opacity .25s ease-in-out;width:100%}&.Picture-module_loaded__fpjpQ img{opacity:1}}}");const s=({children:c,className:s,style:m,draggable:l=!1,alt:u,src:n,srcDesktop:p,srcMobile:g,ar:_,arMobile:b,arDesktop:h,border:P=!1,borderColor:x="black",loading:f="lazy",srcset:y,sizes:j,maxHeight:S,maxHeightMobile:z,maxHeightDesktop:k,figcaption:w,figcaptionColor:T,...F})=>{const[Q,v]=r(!1),{width:C}=t();return console.log(Q),e("figure",{className:d.n23mPictureFigure,children:[e("picture",{className:[d.n23mPicture,"n23mPicture",P&&d.border,Q&&d.loaded,s].filter(Boolean).join(" "),...F,style:{...a({"--picture-bc":x,"--picture-mh":k||z?z&&C<767.98?z:k||z:S}),...m},children:[p&&i("source",{media:"(min-width: 768px)",srcSet:p}),g&&i("source",{media:"(max-width: 767.98px)",srcSet:g}),i("img",{sizes:j,srcSet:y,width:h||b?b&&C<767.98?b:h||b:_,height:1,src:p||g||n||"",alt:u,loading:f,onLoad:()=>v(!0),draggable:l})]}),w&&i("figcaption",{children:i(o,{tag:"p",desktopSize:12,mobileSize:12,color:T,margin:"3px 0 3px 0",children:w})})]})};export{s as Picture};
1
+ import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as r}from"react";import{u as t}from"./useWindowSize-CAQRbyxi.js";import{T as o}from"./TextBox-dHL75Jj9.js";import{g as a}from"./getCssVariableStyle-CBKDTT0s.js";import{s as c}from"./style-inject.es-BnTDb6vU.js";var d={n23mPictureFigure:"Picture-module_n23mPictureFigure__uStTO",n23mPicture:"Picture-module_n23mPicture__LpndY",border:"Picture-module_border__yjTpQ",loaded:"Picture-module_loaded__fpjpQ"};c("@layer n23mPicture{.Picture-module_n23mPictureFigure__uStTO{margin:0;padding:0}.Picture-module_n23mPicture__LpndY{box-sizing:border-box;display:block;&.Picture-module_border__yjTpQ{border:2px solid var(--picture-bc);padding:5px}& img{display:grid;height:auto;max-height:var(--picture-mh,unset);opacity:0;transition:opacity .25s ease-in-out;width:100%}&.Picture-module_loaded__fpjpQ img{opacity:1}}}");const s=({children:c,className:s,style:m,draggable:l=!1,alt:u,src:n,srcDesktop:p,srcMobile:g,ar:_,arMobile:b,arDesktop:h,border:P=!1,borderColor:x="black",loading:f="lazy",srcset:y,sizes:j,maxHeight:S,maxHeightMobile:z,maxHeightDesktop:k,figcaption:w,figcaptionColor:T,...F})=>{const[Q,v]=r(!1),{width:C}=t();return e("figure",{className:d.n23mPictureFigure,children:[e("picture",{className:[d.n23mPicture,"n23mPicture",P&&d.border,Q&&d.loaded,s].filter(Boolean).join(" "),...F,style:{...a({"--picture-bc":x,"--picture-mh":k||z?z&&C<767.98?z:k||z:S}),...m},children:[p&&i("source",{media:"(min-width: 768px)",srcSet:p}),g&&i("source",{media:"(max-width: 767.98px)",srcSet:g}),i("img",{sizes:j,srcSet:y,width:h||b?b&&C<767.98?b:h||b:_,height:1,src:p||g||n||"",alt:u,loading:f,onLoad:()=>v(!0),draggable:l})]}),w&&i("figcaption",{children:i(o,{tag:"p",desktopSize:12,mobileSize:12,color:T,margin:"3px 0 3px 0",children:w})})]})};export{s as Picture};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najwer23morsels",
3
- "version": "0.15.7",
3
+ "version": "0.15.8",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./lib/index.mjs",
6
6
  "types": "./lib/index.d.ts",