@bothub-chat/ui 2.17.2 → 2.17.3

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.
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{styled as t,css as i}from"styled-components";import{Avatar as n}from"../avatar/index.js";import{Typography as o}from"../typography/index.js";import{Badge as a}from"../badge/index.js";import{Backdrop as l}from"../backdrop/index.js";import{Image as p}from"../image/index.js";import{Button as d}from"../button/index.js";import{Container as r}from"../container/index.js";import{ArrowNarrowLeftIcon as s}from"../../icons/arrow-narrow-left/index.js";import{ArrowNarrowRightIcon as m}from"../../icons/arrow-narrow-right/index.js";import{adaptive as c}from"../../adaptive/index.js";import{ZoommableImage as g}from"./zoommable-image/index.js";const f=t.div.withConfig({displayName:"styled__ImageFullScreenStyled",componentId:"sc-n12p0f-0"})(["display:flex;justify-content:center;align-items:center;position:fixed;top:0px;bottom:0px;left:0px;right:0px;padding-top:34px;z-index:",";pointer-events:none;@media (max-height:600px){--bothub-scale:0.8;}@media (max-height:460px){--bothub-scale:0.6;}@media (max-height:440px){--bothub-scale:0.5;}"],(({theme:e})=>e.zIndex.modal)),h=t(l).withConfig({displayName:"styled__ImageFullScreenBackdrop",componentId:"sc-n12p0f-1"})(["pointer-events:auto;"]),x=t(r).withConfig({displayName:"styled__ImageFullScreenContainer",componentId:"sc-n12p0f-2"})(["height:100%;"]),y=t.div.withConfig({displayName:"styled__ImageFullScreenContent",componentId:"sc-n12p0f-3"})(["display:flex;align-items:center;flex-direction:column;position:relative;height:100%;z-index:",";"],(({theme:e})=>e.zIndex.modal+1)),u=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlock",componentId:"sc-n12p0f-4"})(["display:flex;flex-shrink:0;width:100%;background:",";border-bottom:1px solid ",";border-radius:17px;overflow:hidden;padding:16px 24px;pointer-events:auto;"],(({theme:e})=>e.colors.grayScale.gray4),(({theme:e})=>e.colors.grayScale.gray2)),w=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlockContent",componentId:"sc-n12p0f-5"})(["display:flex;justify-content:space-between;width:100%;"]),I=t.div.withConfig({displayName:"styled__ImageFullScreenAuthor",componentId:"sc-n12p0f-6"})(["display:flex;align-items:center;gap:12px;"]),v=t(n).attrs({size:30}).withConfig({displayName:"styled__ImageFullScreenAuthorAvatar",componentId:"sc-n12p0f-7"})([""]),_=t(o).attrs({variant:"body-m-medium"}).withConfig({displayName:"styled__ImageFullScreenAuthorName",componentId:"sc-n12p0f-8"})(["cursor:default;"]),C=t(a).attrs({variant:"info"}).withConfig({displayName:"styled__ImageFullScreenAuthorTag",componentId:"sc-n12p0f-9"})([""]),b=t.div.withConfig({displayName:"styled__ImageFullScreenToolbar",componentId:"sc-n12p0f-10"})([""]),S=t.div.withConfig({displayName:"styled__ImageFullScreenMain",componentId:"sc-n12p0f-11"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;"]),N=t.div.withConfig({displayName:"styled__ImageFullScreenCarousel",componentId:"sc-n12p0f-12"})(["position:relative;width:100vw;overflow:hidden;"]),F=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselContainer",componentId:"sc-n12p0f-13"})(["display:flex;will-change:transform;touch-action:none;user-select:none;width:100%;height:100%;transition:transform 0.3s ease-in-out;"]),j=t.div.withConfig({displayName:"styled__ImageFullScreenSlide",componentId:"sc-n12p0f-14"})(["width:100vw;flex-shrink:0;pointer-events:none;display:flex;align-items:center;justify-content:center;& > *{pointer-events:all;};&:active{cursor:grabbing;}"]),k=t(g).withConfig({displayName:"styled__ImageFullScreenImage",componentId:"sc-n12p0f-15"})(["& > * > img{object-fit:cover;width:auto;height:auto;max-height:min(60vh,512px);pointer-events:none;user-select:none;"," @media (max-height:600px){max-width:256px;max-height:256px;}}"],c({merge:!0,desktop:i(["max-width:512px;"]),mobile:i(["max-width:256px;"])})),z=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselButtons",componentId:"sc-n12p0f-16"})(["display:flex;justify-content:center;align-items:center;position:absolute;top:0px;bottom:0px;left:0px;right:0px;width:100vw;z-index:1;pointer-events:none;"," @media (max-height:600px){gap:calc(min(256px,","px) + 48px);}"],c((({$imageWidth:e})=>({merge:!0,desktop:i(["gap:calc(min(512px,","px) + 48px);"],e),mobile:i(["gap:calc(min(256px,","px) + 48px);"],e)}))),(({$imageWidth:e})=>e)),B=t(d).attrs({children:e(s,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselPrevButton",componentId:"sc-n12p0f-17"})(["pointer-events:auto;"]),A=t(d).attrs({children:e(m,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselNextButton",componentId:"sc-n12p0f-18"})(["pointer-events:auto;"]),P=t.div.withConfig({displayName:"styled__ImageFullScreenPreview",componentId:"sc-n12p0f-19"})(["display:flex;flex-shrink:0;border-radius:14px;overflow:hidden;background:",";margin-top:20px;pointer-events:auto;",""],(({theme:e})=>e.colors.grayScale.gray3),c({merge:!0,desktop:i(["padding:10px;"]),mobile:i(["padding:8px;"])})),T=t.div.withConfig({displayName:"styled__ImageFullScreenPreviewImages",componentId:"sc-n12p0f-20"})(["display:flex;gap:10px;"]),$=t(p).attrs({width:64,height:64,loading:"skeleton"}).withConfig({displayName:"styled__ImageFullScreenPreviewImage",componentId:"sc-n12p0f-21"})(["display:inline-flex;width:auto;border-radius:10px;cursor:pointer;opacity:",";transition:0.225s opacity;object-fit:cover;&:hover{opacity:1;}"],(({$active:e})=>e?1:.6));export{I as ImageFullScreenAuthor,v as ImageFullScreenAuthorAvatar,_ as ImageFullScreenAuthorName,C as ImageFullScreenAuthorTag,h as ImageFullScreenBackdrop,N as ImageFullScreenCarousel,z as ImageFullScreenCarouselButtons,F as ImageFullScreenCarouselContainer,A as ImageFullScreenCarouselNextButton,B as ImageFullScreenCarouselPrevButton,x as ImageFullScreenContainer,y as ImageFullScreenContent,k as ImageFullScreenImage,S as ImageFullScreenMain,P as ImageFullScreenPreview,$ as ImageFullScreenPreviewImage,T as ImageFullScreenPreviewImages,j as ImageFullScreenSlide,f as ImageFullScreenStyled,b as ImageFullScreenToolbar,u as ImageFullScreenTopBlock,w as ImageFullScreenTopBlockContent};
1
+ import{jsx as e}from"react/jsx-runtime";import{styled as t,css as i}from"styled-components";import{Avatar as n}from"../avatar/index.js";import{Typography as o}from"../typography/index.js";import{Badge as a}from"../badge/index.js";import{Backdrop as p}from"../backdrop/index.js";import{Image as d}from"../image/index.js";import{Button as l}from"../button/index.js";import{Container as r}from"../container/index.js";import{ArrowNarrowLeftIcon as s}from"../../icons/arrow-narrow-left/index.js";import{ArrowNarrowRightIcon as m}from"../../icons/arrow-narrow-right/index.js";import{adaptive as c}from"../../adaptive/index.js";import{ZoommableImage as g}from"./zoommable-image/index.js";const h=t.div.withConfig({displayName:"styled__ImageFullScreenStyled",componentId:"sc-n12p0f-0"})(["display:flex;justify-content:center;align-items:center;position:fixed;top:0px;bottom:0px;left:0px;right:0px;padding-top:34px;z-index:",";pointer-events:none;@media (max-height:600px){--bothub-scale:0.8;}@media (max-height:460px){--bothub-scale:0.6;}@media (max-height:440px){--bothub-scale:0.5;}"],(({theme:e})=>e.zIndex.modal)),x=t(p).withConfig({displayName:"styled__ImageFullScreenBackdrop",componentId:"sc-n12p0f-1"})(["pointer-events:auto;"]),f=t(r).withConfig({displayName:"styled__ImageFullScreenContainer",componentId:"sc-n12p0f-2"})(["height:100%;"]),y=t.div.withConfig({displayName:"styled__ImageFullScreenContent",componentId:"sc-n12p0f-3"})(["display:flex;align-items:center;flex-direction:column;position:relative;height:100%;z-index:",";"],(({theme:e})=>e.zIndex.modal+1)),u=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlock",componentId:"sc-n12p0f-4"})(["display:flex;flex-shrink:0;width:100%;background:",";border-bottom:1px solid ",";border-radius:17px;overflow:hidden;padding:16px 24px;pointer-events:auto;"],(({theme:e})=>e.colors.grayScale.gray4),(({theme:e})=>e.colors.grayScale.gray2)),w=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlockContent",componentId:"sc-n12p0f-5"})(["display:flex;justify-content:space-between;width:100%;"]),I=t.div.withConfig({displayName:"styled__ImageFullScreenAuthor",componentId:"sc-n12p0f-6"})(["display:flex;align-items:center;gap:12px;"]),v=t(n).attrs({size:30}).withConfig({displayName:"styled__ImageFullScreenAuthorAvatar",componentId:"sc-n12p0f-7"})([""]),_=t(o).attrs({variant:"body-m-medium"}).withConfig({displayName:"styled__ImageFullScreenAuthorName",componentId:"sc-n12p0f-8"})(["cursor:default;"]),b=t(a).attrs({variant:"info"}).withConfig({displayName:"styled__ImageFullScreenAuthorTag",componentId:"sc-n12p0f-9"})([""]),C=t.div.withConfig({displayName:"styled__ImageFullScreenToolbar",componentId:"sc-n12p0f-10"})([""]),S=t.div.withConfig({displayName:"styled__ImageFullScreenMain",componentId:"sc-n12p0f-11"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;"]),N=t.div.withConfig({displayName:"styled__ImageFullScreenCarousel",componentId:"sc-n12p0f-12"})(["position:relative;width:100vw;overflow:hidden;"]),F=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselContainer",componentId:"sc-n12p0f-13"})(["display:flex;will-change:transform;touch-action:none;user-select:none;width:100%;height:100%;transition:transform 0.3s ease-in-out;"]),j=t.div.withConfig({displayName:"styled__ImageFullScreenSlide",componentId:"sc-n12p0f-14"})(["width:100vw;flex-shrink:0;pointer-events:none;display:flex;align-items:center;justify-content:center;& > *{pointer-events:all;};&:active{cursor:grabbing;}"]),k=t(g).withConfig({displayName:"styled__ImageFullScreenImage",componentId:"sc-n12p0f-15"})(["& > * > img{object-fit:cover;width:auto;height:auto;max-height:min(60vh,512px);pointer-events:none;user-select:none;"," @media (max-height:600px){max-width:256px;max-height:256px;}}& > div > span{max-height:min(60vh,512px);"," @media (max-height:600px){max-width:256px;max-height:256px;}}"],c({merge:!0,desktop:i(["max-width:512px;"]),mobile:i(["max-width:256px;"])}),c({merge:!0,desktop:i(["max-width:512px;"]),mobile:i(["max-width:256px;"])})),z=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselButtons",componentId:"sc-n12p0f-16"})(["display:flex;justify-content:center;align-items:center;position:absolute;top:0px;bottom:0px;left:0px;right:0px;width:100vw;z-index:1;pointer-events:none;"," @media (max-height:600px){gap:calc(min(256px,","px) + 48px);}"],c((({$imageWidth:e})=>({merge:!0,desktop:i(["gap:calc(min(512px,","px) + 48px);"],e),mobile:i(["gap:calc(min(256px,","px) + 48px);"],e)}))),(({$imageWidth:e})=>e)),B=t(l).attrs({children:e(s,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselPrevButton",componentId:"sc-n12p0f-17"})(["pointer-events:auto;"]),A=t(l).attrs({children:e(m,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselNextButton",componentId:"sc-n12p0f-18"})(["pointer-events:auto;"]),P=t.div.withConfig({displayName:"styled__ImageFullScreenPreview",componentId:"sc-n12p0f-19"})(["display:flex;flex-shrink:0;border-radius:14px;overflow:hidden;background:",";margin-top:20px;pointer-events:auto;",""],(({theme:e})=>e.colors.grayScale.gray3),c({merge:!0,desktop:i(["padding:10px;"]),mobile:i(["padding:8px;"])})),T=t.div.withConfig({displayName:"styled__ImageFullScreenPreviewImages",componentId:"sc-n12p0f-20"})(["display:flex;gap:10px;"]),$=t(d).attrs({width:64,height:64,loading:"skeleton"}).withConfig({displayName:"styled__ImageFullScreenPreviewImage",componentId:"sc-n12p0f-21"})(["display:inline-flex;width:auto;border-radius:10px;cursor:pointer;opacity:",";transition:0.225s opacity;object-fit:cover;&:hover{opacity:1;}"],(({$active:e})=>e?1:.6));export{I as ImageFullScreenAuthor,v as ImageFullScreenAuthorAvatar,_ as ImageFullScreenAuthorName,b as ImageFullScreenAuthorTag,x as ImageFullScreenBackdrop,N as ImageFullScreenCarousel,z as ImageFullScreenCarouselButtons,F as ImageFullScreenCarouselContainer,A as ImageFullScreenCarouselNextButton,B as ImageFullScreenCarouselPrevButton,f as ImageFullScreenContainer,y as ImageFullScreenContent,k as ImageFullScreenImage,S as ImageFullScreenMain,P as ImageFullScreenPreview,$ as ImageFullScreenPreviewImage,T as ImageFullScreenPreviewImages,j as ImageFullScreenSlide,h as ImageFullScreenStyled,C as ImageFullScreenToolbar,u as ImageFullScreenTopBlock,w as ImageFullScreenTopBlockContent};
@@ -0,0 +1,4 @@
1
+ import remarkMath from 'remark-math';
2
+ import rehypeKatex from 'rehype-katex';
3
+ import 'katex/dist/katex.min.css';
4
+ export { remarkMath, rehypeKatex, };
@@ -0,0 +1 @@
1
+ export{default as remarkMath}from"remark-math";export{default as rehypeKatex}from"rehype-katex";import"katex/dist/katex.min.css";
@@ -6,7 +6,7 @@ export declare const useMarkdownPlugins: ({ children }: UseMarkdownPluginsProps)
6
6
  remarkPlugins: (typeof remarkGfm | (typeof import("remark-math").default | {
7
7
  singleDollarTextMath: boolean;
8
8
  })[])[];
9
- rehypePlugins: (typeof import("rehype-katex").default | {
9
+ rehypePlugins: (typeof import("rehype-katex/lib").default | {
10
10
  displayMode: boolean;
11
11
  output: string;
12
12
  errorColor: string;
@@ -1 +1 @@
1
- import{__awaiter as t}from"tslib";import{useState as r,useCallback as e,useEffect as o,useMemo as l}from"react";import i from"remark-gfm";import"../../../theme/index.js";import{useTheme as n}from"../../../theme/hook.js";let u=null,m=null;const s=({children:s})=>{const d=n(),[a,f]=r(!0),[p,c]=r(null!=u?u:null),[h,g]=r(null!=m?m:null),k=e((()=>{a&&queueMicrotask((()=>f(!1)))}),[a]);o((()=>{p&&h||function(){t(this,void 0,void 0,(function*(){if("string"==typeof s&&(t=>{let r=0;for(let e=0;e<t.length;e++)if("$"===t[e]&&r++,2===r)return!0;return!1})(s)){const[r,e]=yield Promise.all([t(void 0,void 0,void 0,(function*(){return u||(u=yield import("remark-math"),u)})),t(void 0,void 0,void 0,(function*(){return m||(m=yield import("rehype-katex"),m)}))]);c(r),g(e),yield import("katex/dist/katex.min.css")}}))}()}),[s,p,h]);return{remarkPlugins:l((()=>null!==p?[i,[p.default,{singleDollarTextMath:a}]]:[i]),[a,p]),rehypePlugins:l((()=>null!==h?[[h.default,{displayMode:!0,output:"html",errorColor:d.colors.orange,strict:k}]]:[]),[k,d,h]),singleDollarTextMath:a}};export{s as useMarkdownPlugins};
1
+ import{__awaiter as r}from"tslib";import{useState as t,useCallback as o,useEffect as e,useMemo as i}from"react";import l from"remark-gfm";import"../../../theme/index.js";import{useTheme as n}from"../../../theme/hook.js";let m=null;const s=({children:s})=>{const u=n(),[a,p]=t(!0),[d,f]=t(null),h=o((()=>{a&&queueMicrotask((()=>p(!1)))}),[a]);e((()=>{d||function(){r(this,void 0,void 0,(function*(){if("string"==typeof s&&(r=>{let t=0;for(let o=0;o<r.length;o++)if("$"===r[o]&&t++,2===t)return!0;return!1})(s)){const t=yield r(void 0,void 0,void 0,(function*(){return m||(m=yield import("./markdown-plugins.js"),m)}));f(t)}}))}()}),[s,d]);return{remarkPlugins:i((()=>null!==d?[l,[d.remarkMath,{singleDollarTextMath:a}]]:[l]),[a,d]),rehypePlugins:i((()=>null!==d?[[d.rehypeKatex,{displayMode:!0,output:"html",errorColor:u.colors.orange,strict:h}]]:[]),[h,u,d]),singleDollarTextMath:a}};export{s as useMarkdownPlugins};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bothub-chat/ui",
3
- "version": "2.17.2",
3
+ "version": "2.17.3",
4
4
  "description": "Bothub UI Components",
5
5
  "keywords": [
6
6
  "bothub",