ono-react-element 0.0.29 → 0.0.30
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/index.js +1 -1
- package/dist/es/useThemePro.tsx-B4A9l0LS.js +1 -0
- package/dist/es/{viewTransitionUtils.ts-tmSvCt31.js → viewTransitionUtils.ts-C-QehXbC.js} +1 -1
- 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 +1 -1
- package/dist/es/useThemePro.tsx-BIU8EPPB.js +0 -1
package/dist/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as x}from "./useClickOutSide.tsx-C6XuLZzd.js";import{u as l}from "./useCountdown.tsx-DWqs6wNp.js";import{u}from "./useEventListener.tsx-C8V9Qip6.js";import{u as g}from "./useGetElementSize.tsx-DML7z5Xp.js";import{u as h}from "./useKeyPress.tsx-hgs6v_Jt.js";import{u as C}from "./useMouseClick.tsx-BmzbuM6X.js";import{u as S}from "./useQuery.tsx-FzGWYq50.js";import{u as y}from "./useTheme.tsx-C-GCpzAS.js";import{u as A}from "./useThemePro.tsx-
|
|
1
|
+
import{u as x}from "./useClickOutSide.tsx-C6XuLZzd.js";import{u as l}from "./useCountdown.tsx-DWqs6wNp.js";import{u}from "./useEventListener.tsx-C8V9Qip6.js";import{u as g}from "./useGetElementSize.tsx-DML7z5Xp.js";import{u as h}from "./useKeyPress.tsx-hgs6v_Jt.js";import{u as C}from "./useMouseClick.tsx-BmzbuM6X.js";import{u as S}from "./useQuery.tsx-FzGWYq50.js";import{u as y}from "./useTheme.tsx-C-GCpzAS.js";import{u as A}from "./useThemePro.tsx-B4A9l0LS.js";import{a as P,c as w}from "./async2syncUtils.ts-DkF1iSK4.js";import{b as D,g as F}from "./browserUtils.ts-DSM1TN_g.js";import{a as E}from "./adjustColor.ts-Bcmtt429.js";import{a as M}from "./adjustingColors.ts-CpC0GUUO.js";import{f as R}from "./formatColor.ts-BpkK5FYe.js";import{g as z}from "./getColorType.ts-B-_g2UQs.js";import{g as V}from "./getContrastColor.ts-5KaKa1G7.js";import{g as q}from "./grayColor.ts-bqVfONY0.js";import{h as Q}from "./hex2hsl.ts-BLU_9tQG.js";import{h as H}from "./hex2hsv.ts-CNUNM2bM.js";import{h as Y}from "./hex2rgb.ts-BQpml6Tb.js";import{h as X}from "./hex3To6.ts-BNOY-YJ2.js";import{h as $}from "./hsl2hex.ts-D9xS0UDg.js";import{h as ro}from "./hsl2rgb.ts-B6-BIsnP.js";import{h as to}from "./hsv2hex.ts-BNkK519v.js";import{h as so}from "./hsv2rgb.ts-Bvoa3lA1.js";import{i as po}from "./isValidColor.ts-CpkuoTf9.js";import{r as xo}from "./randomColor.ts-Cf-bUfCt.js";import{r as lo}from "./rgb2hex.ts-Dkw9FDV4.js";import{r as uo}from "./rgb2hsl.ts-BPiSggZg.js";import{r as go}from "./rgb2hsv.ts-CxNRFDKF.js";import{r as bo}from "./rgb2rgba.ts-Dx8-1nZt.js";import{a as To}from "./addCommasToNumber.ts-Bc5ZX_HW.js";import{a as vo}from "./addEventWithOriginHandler.ts-CBP4faL-.js";import{c as Oo}from "./calculateAspectRatio.ts-DLTMZ6rT.js";import{c as Io}from "./chainClassNames.ts-B9vmfsc1.js";import{c as wo}from "./checkDeviceIsMobile.ts-D_9fa1Z1.js";import{c as Do}from "./checkStatusCode.ts-CeS5vbbx.js";import{c as ko}from "./copy2Clipboard.ts-D-Ux5BRc.js";import{d as Lo}from "./debounce.ts-DtQl9QX-.js";import{d as No}from "./deepCopy.ts-DZSM2TJ5.js";import{e as Uo}from "./ellipsisString.ts-CEHck07f.js";import{g as Wo}from "./gcd.ts-BCWGat6T.js";import{g as jo}from "./getAllTheNumbers.ts-DaNxVd8a.js";import{g as Go}from "./getElementCenterPosition.ts-CpWYej6j.js";import{g as Zo}from "./getImageSIze.ts-BKCUZEmG.js";import{g as Ko}from "./getPointDistance.ts-oQIzWYT7.js";import{g as Jo}from "./getURLSearchParams.ts-CdkTE_NB.js";import{i as _o}from "./isPureNumber.ts-UvzCfFTt.js";import{m as or}from "./mediaAutoplayPolicies.ts-h8T8o7DV.js";import{p as er}from "./padZero.ts-BTMKlRWN.js";import{p as ar}from "./parseQuery.ts-rxlqkZEE.js";import{p as mr}from "./passwordStrength.ts-BSVicol-.js";import{p as fr}from "./pick.ts-CVf1DuK1.js";import{p as ir}from "./printStr.ts-Nd8JNyzN.js";import{p as nr}from "./pureNumber.ts-LjeTI9RC.js";import{q as cr}from "./quickSort.ts-CTYjJtIg.js";import{r as dr}from "./rafTimeout.ts-atBwwlgC.js";import{r as br}from "./randomString.ts-DpWnx0Kc.js";import{r as Tr}from "./removeTag.ts-K8ovHu9Z.js";import{s as vr}from "./safeCapitalizeWord.ts-CBBsQk5s.js";import{s as Or}from "./singleton.ts-BxAjTJl8.js";import{t as Ir}from "./throttle.ts-D_EqcNzV.js";import{b as wr}from "./base64ToBlob.ts-TfYiqeZD.js";import{b as Dr}from "./base64ToFile.ts-DMMwTaBr.js";import{b as kr}from "./blobToBase64.ts-CPZTWtAM.js";import{b as Lr}from "./blobToFile.ts-BXmUv6W-.js";import{d as Nr}from "./downloadFile.ts-1nf2IAw4.js";import{f as Ur}from "./fileToBase64.ts-Dx4eMf1P.js";import{f as Wr}from "./fileToBlob.ts-t5-IVXI8.js";import{f as jr}from "./formatFileSize.ts-DmkABYUs.js";import{g as Gr}from "./getFileName.ts-BeGee0uD.js";import{g as Zr}from "./getFileSuffix.ts-BNoXbi6l.js";import{u as Kr}from "./urlToBase64.ts-t7glJoIV.js";import{u as Jr}from "./urlToBlob.ts-DDhIhkMn.js";import{u as _r}from "./urlToFile.ts-Dp1k4tJm.js";import{c as oe,e as re,i as ee}from "./intersectionObserverUtils.ts-BdWvnE4X.js";import{d as a}from "./distinguishPlatform.ts-D2huTxC3.js";import{c as ae}from "./convertSecondToOtherTime.ts-BJegkJhl.js";import{d as me}from "./dayOfYear.ts-DdscYtyU.js";import{f as fe}from "./formatSecond.ts-CI2ihnKf.js";import{f as ie}from "./formatTime.ts-DNtDsT9L.js";import{l as ne}from "./localFormat.ts-vxgGt_Za.js";import{s as ce}from "./second2Day.ts-DHntMxxp.js";import{c as de}from "./event-B2tGdMqN.js";import{A as be,D as Ce}from "./AutoSliderList-CVDZG5cu.js";import{A as Se}from "./AvatarCrop-CSkrjAcy.js";import{A as ye,L as Oe}from "./List-DXRmDwDo.js";import{B as Ie}from "./Button-P2AG5fc6.js";import{C as we}from "./Card3D-DrfpLxw2.js";import{C as De}from "./Carousel-DOesUSmW.js";import{C as ke}from "./Checkbox-DJYMF9I4.js";import{c as Le}from "./ContextMenu-DlhlsQrA.js";import{E as Ne,c as Re}from "./VirtualList-CoQKjvuB.js";import{F as ze}from "./FileDropZone-BSLGVa4n.js";import{M as Ve}from "./MenuButton-M93IpBnN.js";import{m as qe}from "./Message-COQA0S8d.js";import{M as Qe}from "./Modal-CJrgmTMc.js";import{O as He,a as Ke}from "./Input-Hy30rZ_v.js";import{O as Je}from "./Select-bhQ7DjXD.js";import{P as _e}from "./Pagination-L17GYQVO.js";import{p as ot}from "./PortalRenderer-izu9LyVc.js";import{R as et,a as tt}from "./Radio-CEooiIll.js";import{S as st}from "./ScrollableTabs-okdQWyZ9.js";import{S as pt}from "./SvgImg-D_jzo9p9.js";import{S as xt}from "./Switch-DZ-GXwol.js";import{T as lt}from "./TemplateDialog-iy7z7joV.js";import{t as ut}from "./Toast-CZw9LQzq.js";import{T as gt}from "./Tooltip-DvUB7xZH.js";import{W as ht}from "./Waterfall-B9EXJfxK.js";const m=({onAndroid:o,onIOS:r,onUnknown:e,timeout:t=500})=>()=>{setTimeout(()=>a({onAndroid:o,onIOS:r,onUnknown:e}),t);};export{be as AutoSliderList,Se as AvatarCrop,ye as AwaitList,Ie as Button,we as Card3D,De as Carousel,ke as Checkbox,Ce as Direction,Ne as EstimatedVirtualList,ze as FileDropZone,Oe as List,Ve as MenuButton,Qe as Modal,He as OnoInput,Je as OnoSelect,Ke as OnoTextarea,_e as Pagination,et as Radio,tt as RadioGroup,st as ScrollableTabs,pt as SvgImg,xt as Switch,lt as TemplateDialog,gt as Tooltip,ht as Waterfall,To as addCommasToNumber,vo as addEventWithOriginHandler,E as adjustColor,M as adjustingColors,P as async2syncUtils,wr as base64ToBlob,Dr as base64ToFile,kr as blobToBase64,Lr as blobToFile,D as browserUtils,Oo as calculateAspectRatio,Io as chainClassNames,wo as checkDeviceIsMobile,Do as checkStatusCode,w as clearAsyncContagion,Le as contextMenu,ae as convertSecondToOtherTime,ko as copy2Clipboard,Re as createDataSource,de as createEventEmitter,oe as createIntersectionObserver,me as dayOfYear,Lo as debounce,No as deepCopy,a as distinguishPlatform,m as distinguishPlatformDelay,Nr as downloadFile,re as elementIsInViewport,Uo as ellipsisString,Ur as fileToBase64,Wr as fileToBlob,R as formatColor,jr as formatFileSize,fe as formatSecond,ie as formatTime,Wo as gcd,jo as getAllTheNumbers,F as getBrowserInfo,z as getColorType,V as getContrastColor,Go as getElementCenterPosition,Gr as getFileName,Zr as getFileSuffix,Zo as getImageSIze,Ko as getPointDistance,Jo as getURLSearchParams,q as grayColor,Q as hex2hsl,H as hex2hsv,Y as hex2rgb,X as hex3To6,$ as hsl2hex,ro as hsl2rgb,to as hsv2hex,so as hsv2rgb,ee as intersectionObserverUtils,_o as isPureNumber,po as isValidColor,ne as localFormat,or as mediaAutoplayPolicies,qe as message,er as padZero,ar as parseQuery,mr as passwordStrength,fr as pick,ot as portalRenderer,ir as printStr,nr as pureNumber,cr as quickSort,dr as rafTimeout,xo as randomColor,br as randomString,Tr as removeTag,lo as rgb2hex,uo as rgb2hsl,go as rgb2hsv,bo as rgb2rgba,vr as safeCapitalizeWord,ce as second2Day,Or as singleton,Ir as throttle,ut as toast,Kr as urlToBase64,Jr as urlToBlob,_r as urlToFile,x as useClickOutSide,l as useCountdown,u as useEventListener,g as useGetElementSize,h as useKeyPress,C as useMouseClick,S as useQuery,y as useTheme,A as useThemePro};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as a}from "./viewTransitionUtils.ts-C-QehXbC.js";import{useState as l,useRef as u}from "react";import{u as i}from "./useTheme.tsx-C-GCpzAS.js";const p=(o)=>{const{initTheme:c="light",themeRules:t=(n)=>{n ? document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark");}}=o||Object.assign({}),[m,s]=l(c),e=u(null);return i({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:h,onChange:r})=>{e.current=h||null,r==null||r(),s(n);}];};export{p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const v={changeThemeClipPathCircle:(h)=>{const d="ono-view-transition-clip-path-circle",{element:m,duration:s=300,themeRules:a,onChangeTheme:
|
|
1
|
+
const v={changeThemeClipPathCircle:(h)=>{const d="ono-view-transition-clip-path-circle",{element:m,duration:s=300,themeRules:a,onChangeTheme:l}=h,r=a!=null&&a()||document.documentElement.classList.contains("dark")? "dark":"light";if(!document.startViewTransition)return l(r==="dark" ? "light":"dark");const u=document.startViewTransition(()=>{const e=document.documentElement.classList.contains("dark");l(e ? "light":"dark");}),{top:w,left:p,width:g,height:x}=m.getBoundingClientRect(),t=p+g/2,n=w+x/2,c=[`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" ? c:c.reverse()},{duration:s,fill:"forwards",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+50);});}};export{v};
|