ono-react-element 0.0.29 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/AutoSliderList-drdrxgEX.js +1 -0
- package/dist/es/{AvatarCrop-CSkrjAcy.js → AvatarCrop-Cn9RwTGU.js} +1 -1
- package/dist/es/Button-CWqApx4k.js +1 -0
- package/dist/es/{Card3D-DrfpLxw2.js → Card3D-C1ddJnYV.js} +1 -1
- package/dist/es/Carousel-D7JsU-he.js +1 -0
- package/dist/es/Checkbox-C6L0UHHG.js +1 -0
- package/dist/es/ContextMenu-Cg72hSPN.js +1 -0
- package/dist/es/FileDropZone-CQy4SsUO.js +1 -0
- package/dist/es/{InjunctiveBox-vLlRm8LB.js → InjunctiveBox-DsNUniss.js} +1 -1
- package/dist/es/Input-CdxX4nzt.js +1 -0
- package/dist/es/{MenuButton-M93IpBnN.js → MenuButton-CjudK6uV.js} +1 -1
- package/dist/es/Message-CXBf5Xji.js +1 -0
- package/dist/es/Modal-Cq9ZPw9X.js +1 -0
- package/dist/es/{Pagination-L17GYQVO.js → Pagination-wxdQuNM4.js} +1 -1
- package/dist/es/{PortalRenderer-izu9LyVc.js → PortalRenderer-CUaab_Kw.js} +1 -1
- package/dist/es/Radio-pth5zZkE.js +1 -0
- package/dist/es/ScrollableTabs-CNuEx01I.js +1 -0
- package/dist/es/Select-CprTy0VT.js +1 -0
- package/dist/es/SvgImg-D2DeoPaA.js +1 -0
- package/dist/es/Switch-CQJGc1NQ.js +1 -0
- package/dist/es/TemplateDialog-DAzyCsXv.js +1 -0
- package/dist/es/Toast-1MB_CUWF.js +1 -0
- package/dist/es/Tooltip-7uWxsj7r.js +1 -0
- package/dist/es/VirtualList-DThIEdea.js +1 -0
- package/dist/es/Waterfall-CDXm71jP.js +1 -0
- package/dist/es/adjustColor.ts-D1ttRO_o.js +1 -0
- package/dist/es/adjustingColors.ts-CQV_S12M.js +1 -0
- package/dist/es/base64ToBlob.ts-BpYnI1_k.js +1 -0
- package/dist/es/base64ToFile.ts-B526yxVq.js +1 -0
- package/dist/es/blobToBase64.ts-CJROQ7nO.js +1 -0
- package/dist/es/blobToFile.ts-CjkxPmEw.js +1 -0
- package/dist/es/changeThemeClipPathCircle.ts-CHY9pNkk.js +1 -0
- package/dist/es/clearAsyncContagion.ts-DseR8G-S.js +1 -0
- package/dist/es/controlTheScrollbarScrolling.ts-WYW8laxj.js +1 -0
- package/dist/es/convertSecondToOtherTime.ts-BlSK8Hsn.js +1 -0
- package/dist/es/createIntersectionObserver.ts-CPwdNz7M.js +1 -0
- package/dist/es/dayOfYear.ts-FVQlJIhw.js +1 -0
- package/dist/es/dependencies-D-GIrksw.js +15480 -0
- package/dist/es/distinguishPlatform.ts-BITl3t1o.js +1 -0
- package/dist/es/distinguishPlatformDelay.ts-DupUPv6F.js +1 -0
- package/dist/es/downloadFile.ts-C5v3gvXJ.js +1 -0
- package/dist/es/elementIsInViewport.ts-DnBd8TjE.js +1 -0
- package/dist/es/event-BIaLzjOy.js +1 -0
- package/dist/es/fileToBase64.ts-LDhPtYZ8.js +1 -0
- package/dist/es/fileToBlob.ts-C4Y1I82u.js +1 -0
- package/dist/es/formatColor.ts-D_Sws4M1.js +1 -0
- package/dist/es/formatFileSize.ts-CoUwKtCA.js +1 -0
- package/dist/es/formatSecond.ts-Dc436DN-.js +1 -0
- package/dist/es/formatTime.ts-BY0hrdXI.js +1 -0
- package/dist/es/getBrowserInfo.ts-CFS4Oz41.js +1 -0
- package/dist/es/getColorType.ts-B5Qax_03.js +1 -0
- package/dist/es/getContrastColor.ts-vmwZYf4O.js +1 -0
- package/dist/es/getFileName.ts-CAdDeTqT.js +1 -0
- package/dist/es/getFileSuffix.ts-RBCEexOt.js +1 -0
- package/dist/es/grayColor.ts-BeAK97Od.js +1 -0
- package/dist/es/hex2hsl.ts-fQ072W3P.js +1 -0
- package/dist/es/hex2hsv.ts-Bewjcepy.js +1 -0
- package/dist/es/hex2rgb.ts-tP-M30oZ.js +1 -0
- package/dist/es/hex3To6.ts-epLJiP-G.js +1 -0
- package/dist/es/hsl2hex.ts-BILOsbJk.js +1 -0
- package/dist/es/hsl2rgb.ts-DCdzknv1.js +1 -0
- package/dist/es/hsv2hex.ts-U8Md-VPN.js +1 -0
- package/dist/es/hsv2rgb.ts-C4AdDfKf.js +1 -0
- package/dist/es/index.js +1 -1
- package/dist/es/isValidColor.ts-oChVkAT9.js +1 -0
- package/dist/es/localFormat.ts-B32R_kV4.js +1 -0
- package/dist/es/randomColor.ts-BiDP87Yi.js +1 -0
- package/dist/es/rgb2hex.ts-itJEWSC0.js +1 -0
- package/dist/es/rgb2hsl.ts-BmthoL_h.js +1 -0
- package/dist/es/rgb2hsv.ts-o8o8uIwc.js +1 -0
- package/dist/es/rgb2rgba.ts-ZXQCbTkT.js +1 -0
- package/dist/es/second2Day.ts-XjEpcvCc.js +1 -0
- package/dist/es/urlToBase64.ts-DzO1pwIZ.js +1 -0
- package/dist/es/urlToBlob.ts-DmOp0wbt.js +1 -0
- package/dist/es/urlToFile.ts-KrTFcI-e.js +1 -0
- package/dist/es/useClickOutSide.tsx-Drp6uYap.js +1 -0
- package/dist/es/useCountdown.tsx-BHrpYPuf.js +1 -0
- package/dist/es/{useEventListener.tsx-C8V9Qip6.js → useEventListener.tsx-BDtH_FiI.js} +1 -1
- package/dist/es/{useGetElementSize.tsx-DML7z5Xp.js → useGetElementSize.tsx-CYGNJaFz.js} +1 -1
- package/dist/es/useKeyPress.tsx-ClBLUMui.js +1 -0
- package/dist/es/{useMouseClick.tsx-BmzbuM6X.js → useMouseClick.tsx-nz5umn7V.js} +1 -1
- package/dist/es/useThemePro.tsx-MwfY4tCX.js +1 -0
- package/dist/types/event/eventEmitter.d.ts +3 -1
- package/dist/types/hooks/useClickOutSide.d.ts +4 -9
- package/dist/types/hooks/useEventListener.d.ts +3 -6
- package/dist/types/hooks/useGetElementSize.d.ts +1 -2
- package/dist/types/hooks/useKeyPress.d.ts +7 -10
- package/dist/types/hooks/useTheme.d.ts +5 -6
- package/dist/types/hooks/useThemePro.d.ts +1 -1
- package/dist/types/index.d.ts +7 -4
- package/dist/types/utils/async2sync/clearAsyncContagion.d.ts +1 -0
- package/dist/types/utils/browser/getBrowserInfo.d.ts +2 -0
- package/dist/types/utils/color/adjustingColors.d.ts +0 -7
- package/dist/types/utils/color/formatColor.d.ts +1 -3
- package/dist/types/utils/color/getColorType.d.ts +1 -1
- package/dist/types/utils/common/controlTheScrollbarScrolling.d.ts +7 -0
- package/dist/types/utils/file/downloadFile.d.ts +0 -5
- package/dist/types/utils/intersectionObserver/createIntersectionObserver.d.ts +1 -0
- package/dist/types/utils/intersectionObserver/elementIsInViewport.d.ts +5 -0
- package/dist/types/utils/platform/distinguishPlatform.d.ts +1 -6
- package/dist/types/utils/platform/distinguishPlatformDelay.d.ts +1 -2
- package/dist/types/utils/time/convertTimestamp.d.ts +1 -1
- package/dist/types/utils/time/dateFormat.d.ts +1 -2
- package/dist/types/utils/time/localFormat.d.ts +3 -2
- package/dist/types/utils/time/monthFormat.d.ts +1 -2
- package/dist/types/utils/time/yearFormat.d.ts +1 -2
- package/dist/types/utils/viewTransition/changeThemeClipPathCircle.d.ts +6 -0
- package/dist/umd/index.umd.cjs +1 -1
- package/dist/umd/index.umd.cjs.br +0 -0
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +3 -7
- package/dist/es/AutoSliderList-CVDZG5cu.js +0 -1
- package/dist/es/Button-P2AG5fc6.js +0 -1
- package/dist/es/Carousel-DOesUSmW.js +0 -1
- package/dist/es/Checkbox-DJYMF9I4.js +0 -1
- package/dist/es/ContextMenu-DlhlsQrA.js +0 -1
- package/dist/es/FileDropZone-BSLGVa4n.js +0 -1
- package/dist/es/Input-Hy30rZ_v.js +0 -1
- package/dist/es/Message-COQA0S8d.js +0 -1
- package/dist/es/Modal-CJrgmTMc.js +0 -1
- package/dist/es/Radio-CEooiIll.js +0 -1
- package/dist/es/ScrollableTabs-okdQWyZ9.js +0 -1
- package/dist/es/Select-bhQ7DjXD.js +0 -1
- package/dist/es/SvgImg-D_jzo9p9.js +0 -1
- package/dist/es/Switch-DZ-GXwol.js +0 -1
- package/dist/es/TemplateDialog-iy7z7joV.js +0 -1
- package/dist/es/Toast-CZw9LQzq.js +0 -1
- package/dist/es/Tooltip-DvUB7xZH.js +0 -1
- package/dist/es/VirtualList-CoQKjvuB.js +0 -1
- package/dist/es/Waterfall-B9EXJfxK.js +0 -1
- package/dist/es/adjustColor.ts-Bcmtt429.js +0 -1
- package/dist/es/adjustingColors.ts-CpC0GUUO.js +0 -1
- package/dist/es/async2syncUtils.ts-DkF1iSK4.js +0 -1
- package/dist/es/base64ToBlob.ts-TfYiqeZD.js +0 -1
- package/dist/es/base64ToFile.ts-DMMwTaBr.js +0 -1
- package/dist/es/blobToBase64.ts-CPZTWtAM.js +0 -1
- package/dist/es/blobToFile.ts-BXmUv6W-.js +0 -1
- package/dist/es/browserUtils.ts-DSM1TN_g.js +0 -1
- package/dist/es/convertSecondToOtherTime.ts-BJegkJhl.js +0 -1
- package/dist/es/convertTimestamp.ts-DOHA1Ix6.js +0 -1
- package/dist/es/dateFormat.ts-DXskLY1N.js +0 -1
- package/dist/es/dayOfYear.ts-DdscYtyU.js +0 -1
- package/dist/es/dependencies-B7YNjh_z.js +0 -15719
- package/dist/es/distinguishPlatform.ts-D2huTxC3.js +0 -1
- package/dist/es/downloadFile.ts-1nf2IAw4.js +0 -1
- package/dist/es/event-B2tGdMqN.js +0 -1
- package/dist/es/fileToBase64.ts-Dx4eMf1P.js +0 -1
- package/dist/es/fileToBlob.ts-t5-IVXI8.js +0 -1
- package/dist/es/formatColor.ts-BpkK5FYe.js +0 -1
- package/dist/es/formatFileSize.ts-DmkABYUs.js +0 -1
- package/dist/es/formatSecond.ts-CI2ihnKf.js +0 -1
- package/dist/es/formatTime.ts-DNtDsT9L.js +0 -1
- package/dist/es/getColorType.ts-B-_g2UQs.js +0 -1
- package/dist/es/getContrastColor.ts-5KaKa1G7.js +0 -1
- package/dist/es/getFileName.ts-BeGee0uD.js +0 -1
- package/dist/es/getFileSuffix.ts-BNoXbi6l.js +0 -1
- package/dist/es/grayColor.ts-bqVfONY0.js +0 -1
- package/dist/es/hex2hsl.ts-BLU_9tQG.js +0 -1
- package/dist/es/hex2hsv.ts-CNUNM2bM.js +0 -1
- package/dist/es/hex2rgb.ts-BQpml6Tb.js +0 -1
- package/dist/es/hex3To6.ts-BNOY-YJ2.js +0 -1
- package/dist/es/hsl2hex.ts-D9xS0UDg.js +0 -1
- package/dist/es/hsl2rgb.ts-B6-BIsnP.js +0 -1
- package/dist/es/hsv2hex.ts-BNkK519v.js +0 -1
- package/dist/es/hsv2rgb.ts-Bvoa3lA1.js +0 -1
- package/dist/es/intersectionObserverUtils.ts-BdWvnE4X.js +0 -1
- package/dist/es/isValidColor.ts-CpkuoTf9.js +0 -1
- package/dist/es/localFormat.ts-vxgGt_Za.js +0 -1
- package/dist/es/monthFormat.ts-B_s3ZbNy.js +0 -1
- package/dist/es/randomColor.ts-Cf-bUfCt.js +0 -1
- package/dist/es/rgb2hex.ts-Dkw9FDV4.js +0 -1
- package/dist/es/rgb2hsl.ts-BPiSggZg.js +0 -1
- package/dist/es/rgb2hsv.ts-CxNRFDKF.js +0 -1
- package/dist/es/rgb2rgba.ts-Dx8-1nZt.js +0 -1
- package/dist/es/second2Day.ts-DHntMxxp.js +0 -1
- package/dist/es/urlToBase64.ts-t7glJoIV.js +0 -1
- package/dist/es/urlToBlob.ts-DDhIhkMn.js +0 -1
- package/dist/es/urlToFile.ts-Dp1k4tJm.js +0 -1
- package/dist/es/useClickOutSide.tsx-C6XuLZzd.js +0 -1
- package/dist/es/useCountdown.tsx-DWqs6wNp.js +0 -1
- package/dist/es/useKeyPress.tsx-hgs6v_Jt.js +0 -1
- package/dist/es/useThemePro.tsx-BIU8EPPB.js +0 -1
- package/dist/es/viewTransitionUtils.ts-tmSvCt31.js +0 -1
- package/dist/es/yearFormat.ts-DxbWP43R.js +0 -1
- package/dist/types/utils/async2syncUtils.d.ts +0 -5
- package/dist/types/utils/browserUtils.d.ts +0 -10
- package/dist/types/utils/intersectionObserverUtils.d.ts +0 -15
- package/dist/types/utils/viewTransitionUtils.d.ts +0 -9
- /package/dist/es/{useTheme.tsx-C-GCpzAS.js → useTheme.tsx-C7aAN-Zj.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const r=({onAndroid:d,onIOS:i,onUnknown:n})=>{const o=navigator.userAgent;return/android/i.test(o)?(d(),"Android"):/iPad|iPhone|iPod/.test(o)?(i(),"iOS"):(n==null||n(),"Unknown");};export{r as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=async(t,n)=>{const r=(e,s)=>{const c=window.URL.createObjectURL(e),o=document.createElement("a");o.href=c,o.download=encodeURIComponent(s),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(c);};try{if(typeof t=="string"){const e=await fetch(t);if(!e.ok)throw new Error(`Network response was not ok:${e.statusText}`);r(await e.blob(),n);}else r(t,n);}catch(e){console.error("文件下载失败:",e instanceof Error ? e.message:String(e));}};export{a as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var v=(s,t,e)=>t in s ? o(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var h=(s,t,e)=>v(s,typeof t!="symbol" ? t+"":t,e);class c{constructor(t){h(this,"events",{});t.forEach((e)=>{this.events[e]=new Set();});}emit(t,...e){if(!this.events[t])throw new Error(`Event ${t}does not exist`);this.events[t].forEach((i)=>{i(...e);});}on(t,e){this.events[t]||(this.events[t]=new Set()),this.events[t].add(e);}cancel(t,e){this.events[t]&&this.events[t].delete(e);}}let n=null;const a=(s)=>(n||(n=new c(s)),n);export{a as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const s=(a)=>new Promise((o)=>{const e=new FileReader();e.readAsDataURL(a),e.onload=(r)=>{var t;return o((t=r.target)==null ? void 0:t.result);};});export{s as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=(s)=>s.slice(0,s.size,s.type);export{e as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as u}from "./getAllTheNumbers.ts-DaNxVd8a.js";import{r as b}from "./rgb2hex.ts-Dkw9FDV4.js";import{r as c}from "./rgb2hsl.ts-BPiSggZg.js";import{r as n}from "./rgb2hsv.ts-CxNRFDKF.js";const p=(r,t=1,s="rgba")=>{const e=u(r);let m=Number(e[0])/255,o=Number(e[1])/255,a=Number(e[2])/255;switch(s){case "rgba":return `rgba(${m},${o},${a},${t})`;case "hex":return b(r);case "hsl":return c(r);case "hsv":return n(r);default:return r;}};export{p as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=(n,o)=>{const e=["B","KB","MB","GB","TB"];let t=e.indexOf((o==null ? void 0:o.unit)?? "B");if(t===-1)throw new Error("Invalid unit");if(!(o!=null&&o.unit))for(;n/Math.pow(1024,t)>=1024;)t++;return `${(n/Math.pow(1024,t)).toFixed((o==null ? void 0:o.decimalPlaces)?? 0)}${e[t]}`;};export{a as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const n=(o)=>{const t=Math.floor(o/3600),a=Math.floor(o%3600/60),$=Math.floor(o%60),r=(f)=>f.toString().padStart(2,"0");return(t>0 ? `${r(t)}:${r(a)}:${r($)}`:`${r(a)}:${r($)}`)+(o<10 ? ".00":o<100 ? ".0":"");};export{n as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e}from "./padZero.ts-BTMKlRWN.js";import{c as u}from "./convertTimestamp.ts-DOHA1Ix6.js";const g=(p,r="YY-MM-DD hh:mm:ss")=>{const o=["YY","MM","DD","hh","mm","ss"],s=[],t=u(p);s.push(t.getFullYear().toString()),s.push(e(t.getMonth()+1)),s.push(e(t.getDate())),s.push(e(t.getHours())),s.push(e(t.getMinutes())),s.push(e(t.getSeconds()));for(let h in s)r=r.replace(o[h],s[h]);return r;};export{g as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=(s)=>/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(s)? "hex":/^rgb\((1?\d{1,3},\s*1?\d{1,3},\s*1?\d{1,3})\)$/.test(s)? "rgb":"unknown";export{t as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=(e)=>{const n=(function(r){if(r.startsWith("#"))return r.length===4&&(r=`#${r.slice(1).repeat(2)}`),[parseInt(r.substr(1,2),16),parseInt(r.substr(3,2),16),parseInt(r.substr(5,2),16)];if(r.startsWith("rgb")){const t=r.match(/\d+/g);return [parseInt(t[0]),parseInt(t[1]),parseInt(t[2])];}return null;})(e);return n===null ? null:(299*(s=n)[0]+587*s[1]+114*s[2])/1e3>128 ? "#000":"#fff";var s;};export{a as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const r=(s)=>{if(!s)return "";const n=s.lastIndexOf(".");return n===-1 ? r(s.substring(s.lastIndexOf("/")+1)):s.substring(0,n);};export{r as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const s=(n)=>{if(!n)return "";const r=n.lastIndexOf(".");return n.substring(r+1);};export{s as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=(o,s,t)=>0.2126*o+0.7152*s+0.0722*t;export{a as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as r}from "./hex2rgb.ts-BQpml6Tb.js";import{r as m}from "./rgb2hsl.ts-BPiSggZg.js";const p=(o)=>m(r(o));export{p as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as r}from "./hex2rgb.ts-BQpml6Tb.js";import{r as m}from "./rgb2hsv.ts-CxNRFDKF.js";const p=(o)=>m(r(o));export{p as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const i=(r)=>{const e=r.split("#")[1],n=(s)=>[parseInt(s.slice(0,2),16),parseInt(s.slice(2,4),16),parseInt(s.slice(4,6),16)];if(e.length===8){const s=parseInt(e.slice(-2),16)/256,t=n(e.slice(0,-2));return t.push(s),"rgba("+t.join(",")+")";}return "rgb("+n(e).join(",")+")";};export{i as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const r=(e)=>{const t=e.replace("#","").split("");return `#${t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}`;};export{r as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as r}from "./hsl2rgb.ts-B6-BIsnP.js";import{r as m}from "./rgb2hex.ts-Dkw9FDV4.js";const p=(o)=>m(r(o));export{p as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as N}from "./getAllTheNumbers.ts-DaNxVd8a.js";const f=(M)=>{const u=N(M),a=Number(u[0])/360,m=Number(u[1])/100,t=Number(u[2])/100;let c,d,l;function b(n,s,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6 ? n+6*(s-n)*r:r<0.5 ? s:r<2/3 ? n+(s-n)*(2/3-r)*6:n;}let o=t<0.5 ? t*(1+m):t+m-t*m,h=2*t-o;return c=b(h,o,a+1/3),d=b(h,o,a),l=b(h,o,a-1/3),`rgb(${Math.round(255*c)},${Math.round(255*d)},${Math.round(255*l)})`;};export{f as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as r}from "./hsv2rgb.ts-Bvoa3lA1.js";import{r as m}from "./rgb2hex.ts-Dkw9FDV4.js";const p=(o)=>m(r(o));export{p as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as M}from "./getAllTheNumbers.ts-DaNxVd8a.js";const l=(m)=>{const o=M(m);let u=Number(o[0])/360,c=Number(o[1])/100,r=Number(o[2])/100,a=0,e=0,s=0;const h=Math.floor(6*u),k=6*u-h,t=r*(1-c),b=r*(1-k*c),n=r*(1-(1-k)*c);switch(h%6){case 0:a=r,e=n,s=t;break;case 1:a=b,e=r,s=t;break;case 2:a=t,e=r,s=n;break;case 3:a=t,e=b,s=r;break;case 4:a=n,e=t,s=r;break;case 5:a=r,e=t,s=b;}return `rgb(${Math.round(255*a)},${Math.round(255*e)},${Math.round(255*s)})`;};export{l as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const i=(e,n,o,r={root:null,rootMargin:"0px",threshold:0})=>{const s=new IntersectionObserver((t)=>t.forEach((c)=>c.isIntersecting ? n(c):o(c)),r);e.forEach((t)=>s.observe(t));},a=(e,n,o)=>{const r=new IntersectionObserver(n,o);e instanceof HTMLElement ? r.observe(e):e.forEach((s)=>r.observe(s));},b={elementIsInViewport:i,createIntersectionObserver:a};export{a as c,i as e,b as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=(s)=>!(!/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(s)&&!/^rgb\((1?\d{1,3},\s*1?\d{1,3},\s*1?\d{1,3})\)$/.test(s));export{t as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as o}from "./padZero.ts-BTMKlRWN.js";import{c as u}from "./convertTimestamp.ts-DOHA1Ix6.js";import{d as n}from "./dateFormat.ts-DXskLY1N.js";import{m as i}from "./monthFormat.ts-B_s3ZbNy.js";import{y as a}from "./yearFormat.ts-DxbWP43R.js";const D=(h,r="YY-MM-DD hh:mm:ss",e="cn")=>{const p=["YY","MM","DD","hh","mm","ss"],t=[],s=u(h);t.push(a(s.getFullYear().toString(),e)),t.push(i(o(s.getMonth()+1),e)),t.push(n(o(s.getDate()),e)),t.push(o(s.getHours())),t.push(o(s.getMinutes())),t.push(o(s.getSeconds()));for(let m in t)r=r.replace(p[m],t[m]);return r;};export{D as l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=(e,n)=>({en:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],cn:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]})[n][Number(e)-1];export{a as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=()=>"#"+Math.random().toString(16).slice(2,8).padEnd(6,"0");export{t as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as h}from "./getAllTheNumbers.ts-DaNxVd8a.js";const p=(m)=>{const r=h(m),o=(e)=>Number(e).toString(16).padStart(2,"0"),g=(e)=>e.reduce((t,n)=>t+o(n),"#"),u=(e)=>{const t=e,n=Number(e[e.length-1])!==1 ? Number(e[e.length-1]):100;return t.pop(),g(t)+o(2.56*n);};return r.length===3 ? g(r):r.length===5 ? u([r[0],r[1],r[2],10*Number(r[r.length-1])]):u(r);};export{p as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as b}from "./getAllTheNumbers.ts-DaNxVd8a.js";const i=(u)=>{const c=b(u),s=Number(c[0])/255,e=Number(c[1])/255,r=Number(c[2])/255,o=Math.min(s,e,r),t=Math.max(s,e,r);let a=0,h=0,m=(t+o)/2;if(t===o)a=h=0;else{const n=t-o;switch(h=m>0.5 ? n/(2-t-o):n/(t+o),t){case s:a=(e-r)/n+(e<r ? 6:0);break;case e:a=(r-s)/n+2;break;case r:a=(s-e)/n+4;}a/=6;}return `hsl(${Math.round(360*a)},${Math.round(100*h)}%,${Math.round(100*m)}%)`;};export{i as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as i}from "./getAllTheNumbers.ts-DaNxVd8a.js";const u=(b)=>{const m=i(b);let a=Number(m[0])/255,e=Number(m[1])/255,s=Number(m[2])/255;const t=Math.max(a,e,s),o=Math.min(a,e,s);let r=0,n=0,h=t;const c=t-o;if(n=t===0 ? 0:c/t,t===o)r=0;else{switch(t){case a:r=(e-s)/c+(e<s ? 6:0);break;case e:r=(s-a)/c+2;break;case s:r=(a-e)/c+4;}r/=6;}return `hsv(${360*r},${100*n},${100*h})`;};export{u as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const p=(r,s)=>{if(!s)return r;if(r.includes("rgba")){const n=r.split(",");return n.pop(),n.push(s+")"),n.join(",");}if(r.includes("rgb")){const n=r.split(","),i="rgba("+n[0].split("(")[1],t=n[n.length-1].split(")")[0];return [i,n[1],t," "+s+")"].join(",");}};export{p as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p}from "./padZero.ts-BTMKlRWN.js";const l=(r,t)=>{const s=["DD","hh","mm","ss"],o=[];o.push(Math.floor(r/86400)),o.push(p(Math.floor(r%86400/3600))),o.push(p(Math.floor(r%3600/60))),o.push(p(r%60));for(let h=0;h<s.length;h++)t=t.replace(s[h],o[h].toString());return t;};export{l as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as o}from "./blobToBase64.ts-CPZTWtAM.js";import{u as s}from "./urlToBlob.ts-DDhIhkMn.js";const i=async(a)=>await o(await s(a));export{i as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=async(a)=>await(await fetch(a)).blob();export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a}from "./blobToFile.ts-BXmUv6W-.js";import{u as s}from "./urlToBlob.ts-DDhIhkMn.js";const m=async(o)=>a(await s(o));export{m as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as i}from "./useEventListener.tsx-C8V9Qip6.js";const c=(n,o,s)=>i(((t)=>{const e=typeof t=="string" ? [t]:t;if(new Set(e).size!==e.length)throw new Error("there are duplicates in the event type");return e;})((s==null ? void 0:s.event)||"click"),(t)=>{if(n)if(n instanceof Array)n.map((e)=>e instanceof HTMLElement ? e:e.current).some((e)=>!!e&&e.contains(t.target))||o(t);else{const e=n instanceof HTMLElement ? n:n.current;e&&!e.contains(t.target)&&o(t);}},{deps:[n,...(s==null ? void 0:s.deps)||[]]});export{c as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useState as o,useRef as f,useCallback as c,useEffect as T}from "react";const b=(t=60,r)=>{const [u,s]=o(t),[a,l]=o(!1),e=f(null),i=c(()=>l(!0),[]),n=c(()=>{l(!1),s(t),e.current&&(clearTimeout(e.current),e.current=null),r==null||r();},[t,r]);return T(()=>{if(a)return u>0 ? e.current=setTimeout(()=>{s((m)=>m-1);},1e3):n(),()=>{e.current&&(clearTimeout(e.current),e.current=null);};},[a,u,n]),[u,i,n];};export{b as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as p}from "./useEventListener.tsx-C8V9Qip6.js";const h=(o)=>o.toString().toLocaleLowerCase(),k=(o,d,t)=>{const K=(s)=>p(s,(m)=>((u,e,g)=>{u.forEach((c)=>{if(c.includes("+")&&c.length>1){const l=c.split("+"),n=e.ctrlKey&&l.includes("ctrl"),r=e.shiftKey&&l.includes("shift"),i=e.altKey&&l.includes("alt"),y=e.metaKey&&l.includes("meta"),f=(e.ctrlKey||e.metaKey)&&l.includes("commandorcontrol");l.length===2 ?(n||r||i||y||f)&&e.key.toLocaleLowerCase()===l[l.length-1]&&d(e,c):l.length===3&&(n&&r||n&&i||n&&y||n&&f||r&&i||r&&y||r&&f||i&&y||i&&f||y&&f)&&e.key.toLocaleLowerCase()===l[l.length-1]&&d(e,c);}else if(c.includes(h(e.key))){if(g)c===h(e.key)&&d(e,c);else if(!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))return d(e,c);}});})(o instanceof Array ? o.map((u)=>h(u)):[h(o)],m,(t==null ? void 0:t.exactMatch)||!1),{deps:[t==null ? void 0:t.target,...(t==null ? void 0:t.deps)||[]]});(t==null ? void 0:t.events)instanceof Array ? t.events.forEach((s)=>K(s)):K((t==null ? void 0:t.events)||"keydown");};export{k as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v as a}from "./viewTransitionUtils.ts-tmSvCt31.js";import{useState as h,useRef as i}from "react";import{u as l}from "./useTheme.tsx-C-GCpzAS.js";const p=(o)=>{const{initTheme:s="light",themeRules:t=(n)=>{n ? document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark");}}=o||Object.assign({}),[m,c]=h(s),e=i(null);return l({theme:m,onDark:()=>{e.current ? a.changeThemeClipPathCircle({element:e.current,onChangeTheme:()=>t(!0)}):t(!0);},onLight:()=>{e.current ? a.changeThemeClipPathCircle({element:e.current,onChangeTheme:()=>t(!1)}):t(!1);}}),[m,({targetTheme:n,element:u,onChange:r})=>{e.current=u||null,requestAnimationFrame(()=>{r==null||r(),c(n);});}];};export{p as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const v={changeThemeClipPathCircle:(h)=>{const d="ono-view-transition-clip-path-circle",{element:m,duration:s=300,themeRules:a,onChangeTheme:c}=h,r=a!=null&&a()||document.documentElement.classList.contains("dark")? "dark":"light";if(!document.startViewTransition)return c(r==="dark" ? "light":"dark");const u=document.startViewTransition(()=>{const e=document.documentElement.classList.contains("dark");c(e ? "light":"dark");}),{top:w,left:p,width:g,height:x}=m.getBoundingClientRect(),t=p+g/2,n=w+x/2,l=[`circle(0%at ${t}px ${n}px)`,`circle(${Math.hypot(Math.max(t,window.innerWidth-t),Math.max(n,window.innerHeight-n))}px at ${t}px ${n}px)`];((e,i)=>{const o=document.createElement("style");o.setAttribute("type","text/css"),o.setAttribute("data-style-tag",i),o.textContent=`::view-transition-old(root),::view-transition-new(root){animation:none;}.dark::view-transition-old(root){z-index:1;}.dark::view-transition-new(root){z-index:999;}::view-transition-old(root){z-index:999;}::view-transition-new(root){z-index:1;}`,document.head.appendChild(o);})(0,d),u.ready.then(()=>{document.documentElement.animate({clipPath:r==="light" ? l:l.reverse()},{duration:s,easing:"ease-in-out",pseudoElement:r==="light" ? "::view-transition-new(root)":"::view-transition-old(root)"}),setTimeout(()=>((e)=>{document.head.querySelectorAll("style").forEach((i)=>i.getAttribute("data-style-tag")===e&&i.remove());})(d),s+100);});}};export{v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const r=(n,e)=>{const t={en:["0","1","2","3","4","5","6","7","8","9"],cn:["零","一","二","三","四","五","六","七","八","九"]};return n.split("").map((o)=>t[e][Number(o)]).join("");};export{r as y};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const elementIsInViewport: (elements: HTMLElement[], onIntersecting: (entry: IntersectionObserverEntry) => void, onUnIntersecting: (entry: IntersectionObserverEntry) => void, options?: {
|
|
2
|
-
root?: Element | Document | null;
|
|
3
|
-
rootMargin?: string;
|
|
4
|
-
threshold?: number | number[];
|
|
5
|
-
}) => void;
|
|
6
|
-
export declare const createIntersectionObserver: (observingEls: HTMLElement | HTMLElement[], callBack: (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void, options?: IntersectionObserverInit) => void;
|
|
7
|
-
declare const _default: {
|
|
8
|
-
elementIsInViewport: (elements: HTMLElement[], onIntersecting: (entry: IntersectionObserverEntry) => void, onUnIntersecting: (entry: IntersectionObserverEntry) => void, options?: {
|
|
9
|
-
root?: Element | Document | null;
|
|
10
|
-
rootMargin?: string;
|
|
11
|
-
threshold?: number | number[];
|
|
12
|
-
}) => void;
|
|
13
|
-
createIntersectionObserver: (observingEls: HTMLElement | HTMLElement[], callBack: (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void, options?: IntersectionObserverInit) => void;
|
|
14
|
-
};
|
|
15
|
-
export default _default;
|
|
File without changes
|