reaxify 0.0.73 → 0.0.75

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
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../../_virtual/jsx-runtime.cjs.js"),i=require("react"),d=require("../../hooks/useClasses.cjs.js"),C=require("../../hooks/useKeyDown.cjs.js"),h=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),v=require("../../helpers/cn.cjs.js"),f=require("../Card/index.cjs.js"),D=require("../Portal/index.cjs.js"),M=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),b=i.createContext({open:!1,onClose:()=>{},duration:300,anchor:"start",transitionState:"unmounted"});function x({as:n,ref:a,open:r=!1,onClose:e=()=>{},duration:o=300,anchor:u="end",className:w="",children:p,...y}){const t=d(l=>l.drawer),c=i.useRef(null),m=n||"div",R={entering:"active opacity-100 pointer-events-auto",entered:"active opacity-100 pointer-events-auto",exiting:"opacity-0 pointer-events-none",exited:"opacity-0 pointer-events-none",unmounted:""},g=i.useMemo(()=>{var j;const l={start:"flex-row-reverse",end:"flex-row",top:"flex-col-reverse",bottom:"flex-col"},E=(j=t==null?void 0:t.anchor)==null?void 0:j[u];return[l[u],E]},[u,t==null?void 0:t.anchor]);return i.useImperativeHandle(a,()=>c.current),C(e,"Escape",r),s.jsxRuntimeExports.jsx(D,{children:s.jsxRuntimeExports.jsx(M.default,{nodeRef:c,in:r,timeout:o,unmountOnExit:!0,children:l=>s.jsxRuntimeExports.jsxs(m,{ref:c,style:{transitionDuration:`${o}ms`},"data-open":r,className:h.twMerge("fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",t==null?void 0:t.base,R[l],g,w),...y,children:[s.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>e(),className:"absolute inset-0 size-full cursor-default opacity-0"}),s.jsxRuntimeExports.jsx(b.Provider,{value:{open:r,onClose:e,transitionState:l,duration:o,anchor:u},children:p})]})})})}function q({children:n,className:a="",...r}){const e=d(t=>t.drawer.menu),{anchor:o,duration:u,transitionState:w}=i.useContext(b),p=i.useMemo(()=>{var m;const t={start:"w-[31.875rem] h-full max-w-[97.5%] rounded-e me-auto",end:"w-[31.875rem] h-full max-w-[97.5%] rounded-s ms-auto",top:"w-full h-[31.875rem] max-h-[97.5%] rounded-b mb-auto",bottom:"w-full h-[31.875rem] max-h-[97.5%] rounded-t mt-auto"},c=(m=e==null?void 0:e.anchor)==null?void 0:m[o];return[t[o],c]},[o,e==null?void 0:e.anchor]),y=i.useMemo(()=>({start:{entering:"translate-x-0",entered:"translate-x-0",exiting:"-translate-x-[calc(100%*var(--drawer-ratio))]",exited:"-translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},end:{entering:"translate-x-0",entered:"translate-x-0",exiting:"translate-x-[calc(100%*var(--drawer-ratio))]",exited:"translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},top:{entering:"translate-y-0",entered:"translate-y-0",exiting:"-translate-y-full",exited:"-translate-y-full",unmounted:""},bottom:{entering:"translate-y-0",entered:"translate-y-0",exiting:"translate-y-full",exited:"translate-y-full",unmounted:""}})[o],[o]);return s.jsxRuntimeExports.jsx(f,{as:"div",style:{transitionDuration:`${u}ms`},className:h.twMerge("relative flex flex-col transition-[translate,width] rounded-none",e==null?void 0:e.base,y[w],p,a),...r,children:n})}function N({className:n,...a}){const r=d(e=>e.drawer.header.base);return s.jsxRuntimeExports.jsx(f.Header,{className:v(r,n),...a})}function S({className:n,...a}){const r=d(e=>e.drawer.body.base);return s.jsxRuntimeExports.jsx(f.Body,{className:v("flex-1 overflow-auto",r,n),...a})}function H({className:n,...a}){const r=d(e=>e.drawer.footer.base);return s.jsxRuntimeExports.jsx(f.Footer,{className:v(r,n),...a})}x.Menu=q;x.Header=N;x.Body=S;x.Footer=H;exports.DrawerContext=b;exports.default=x;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../../_virtual/jsx-runtime.cjs.js"),i=require("react"),d=require("../../hooks/useClasses.cjs.js"),C=require("../../hooks/useKeyDown.cjs.js"),h=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),v=require("../../helpers/cn.cjs.js"),f=require("../Card/index.cjs.js"),D=require("../Portal/index.cjs.js"),M=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),b=i.createContext({open:!1,onClose:()=>{},duration:300,anchor:"start",transitionState:"unmounted"});function x({as:n,ref:a,open:r=!1,onClose:e=()=>{},duration:o=300,anchor:u="end",className:w="",children:p,...y}){const t=d(l=>l.drawer),c=i.useRef(null),m=n||"div",R={entering:"active opacity-100 pointer-events-auto",entered:"active opacity-100 pointer-events-auto",exiting:"opacity-0 pointer-events-none",exited:"opacity-0 pointer-events-none",unmounted:""},g=i.useMemo(()=>{var j;const l={start:"flex-row-reverse",end:"flex-row",top:"flex-col-reverse",bottom:"flex-col"},E=(j=t==null?void 0:t.anchor)==null?void 0:j[u];return[l[u],E]},[u,t==null?void 0:t.anchor]);return i.useImperativeHandle(a,()=>c.current),C(e,"Escape",r),s.jsxRuntimeExports.jsx(D,{children:s.jsxRuntimeExports.jsx(M.default,{nodeRef:c,in:r,timeout:o,unmountOnExit:!0,children:l=>s.jsxRuntimeExports.jsxs(m,{ref:c,style:{transitionDuration:`${o}ms`},"data-open":r,className:h.twMerge("fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",t==null?void 0:t.base,R[l],g,w),...y,children:[s.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>e(),className:"absolute inset-0 size-full cursor-default opacity-0"}),s.jsxRuntimeExports.jsx(b.Provider,{value:{open:r,onClose:e,transitionState:l,duration:o,anchor:u},children:p})]})})})}function q({children:n,className:a="",...r}){const e=d(t=>t.drawer.menu),{anchor:o,duration:u,transitionState:w}=i.useContext(b),p=i.useMemo(()=>{var m;const t={start:"w-[31.875rem] h-full max-w-[92.5%] rounded-e me-auto",end:"w-[31.875rem] h-full max-w-[92.5%] rounded-s ms-auto",top:"w-full h-[31.875rem] max-h-[92.5%] rounded-b mb-auto",bottom:"w-full h-[31.875rem] max-h-[92.5%] rounded-t mt-auto"},c=(m=e==null?void 0:e.anchor)==null?void 0:m[o];return[t[o],c]},[o,e==null?void 0:e.anchor]),y=i.useMemo(()=>({start:{entering:"translate-x-0",entered:"translate-x-0",exiting:"-translate-x-[calc(100%*var(--drawer-ratio))]",exited:"-translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},end:{entering:"translate-x-0",entered:"translate-x-0",exiting:"translate-x-[calc(100%*var(--drawer-ratio))]",exited:"translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},top:{entering:"translate-y-0",entered:"translate-y-0",exiting:"-translate-y-full",exited:"-translate-y-full",unmounted:""},bottom:{entering:"translate-y-0",entered:"translate-y-0",exiting:"translate-y-full",exited:"translate-y-full",unmounted:""}})[o],[o]);return s.jsxRuntimeExports.jsx(f,{as:"div",style:{transitionDuration:`${u}ms`},className:h.twMerge("relative flex flex-col transition-[translate,width] rounded-none",e==null?void 0:e.base,y[w],p,a),...r,children:n})}function N({className:n,...a}){const r=d(e=>e.drawer.header.base);return s.jsxRuntimeExports.jsx(f.Header,{className:v(r,n),...a})}function S({className:n,...a}){const r=d(e=>e.drawer.body.base);return s.jsxRuntimeExports.jsx(f.Body,{className:v("flex-1 overflow-auto",r,n),...a})}function H({className:n,...a}){const r=d(e=>e.drawer.footer.base);return s.jsxRuntimeExports.jsx(f.Footer,{className:v(r,n),...a})}x.Menu=q;x.Header=N;x.Body=S;x.Footer=H;exports.DrawerContext=b;exports.default=x;
@@ -88,10 +88,10 @@ function E({ children: n, className: a = "", ...r }) {
88
88
  const t = d((e) => e.drawer.menu), { anchor: o, duration: i, transitionState: f } = M(g), w = y(() => {
89
89
  var c;
90
90
  const e = {
91
- start: "w-[31.875rem] h-full max-w-[97.5%] rounded-e me-auto",
92
- end: "w-[31.875rem] h-full max-w-[97.5%] rounded-s ms-auto",
93
- top: "w-full h-[31.875rem] max-h-[97.5%] rounded-b mb-auto",
94
- bottom: "w-full h-[31.875rem] max-h-[97.5%] rounded-t mt-auto"
91
+ start: "w-[31.875rem] h-full max-w-[92.5%] rounded-e me-auto",
92
+ end: "w-[31.875rem] h-full max-w-[92.5%] rounded-s ms-auto",
93
+ top: "w-full h-[31.875rem] max-h-[92.5%] rounded-b mb-auto",
94
+ bottom: "w-full h-[31.875rem] max-h-[92.5%] rounded-t mt-auto"
95
95
  }, u = (c = t == null ? void 0 : t.anchor) == null ? void 0 : c[o];
96
96
  return [e[o], u];
97
97
  }, [o, t == null ? void 0 : t.anchor]), p = y(() => ({
@@ -1,5 +1,5 @@
1
- export declare function isEmpty(value: unknown): boolean;
2
- export declare function isEmptyValue(value: unknown): value is null | undefined;
3
- export declare function isEmptyString(value: unknown): value is "";
4
- export declare function isEmptyObject(value: unknown): boolean;
5
- export declare function isEmptyArray(value: unknown): boolean;
1
+ export declare function isEmpty<T>(value: T): value is Extract<T, null | undefined>;
2
+ export declare function isEmptyValue<T>(value: T): value is Extract<T, null | undefined>;
3
+ export declare function isEmptyString<T>(value: T): boolean;
4
+ export declare function isEmptyObject<T>(value: T): boolean;
5
+ export declare function isEmptyArray<T>(value: T): boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reaxify",
3
3
  "private": false,
4
- "version": "0.0.73",
4
+ "version": "0.0.75",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [