@appartmint/tsm-mint 0.0.4 → 0.0.5

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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../types/box.cjs.js"),l=require("../types/time.cjs.js");function h({el:t,duration:s=l.durationDefault,from:e=r.boxPositions[0]}){if(!t)return;const i=e==="top"||e==="bottom",{scrollHeight:o,scrollWidth:n}=t;t.style.display="",requestAnimationFrame(()=>{i?t.style.height=`${o}px`:t.style.width=`${n}px`,setTimeout(()=>{i?t.style.height="auto":t.style.width="auto"},s)})}function u({el:t,duration:s=l.durationDefault,from:e=r.boxPositions[0]}){if(!t)return;const i=e==="top"||e==="bottom",{scrollHeight:o,scrollWidth:n,style:{transition:a}}=t;t.style.transition="",requestAnimationFrame(()=>{i?t.style.height=`${o}px`:t.style.width=`${n}px`,t.style.transition=a,requestAnimationFrame(()=>{i?t.style.height="0":t.style.width="0"})}),setTimeout(()=>{t.style.display="none"},s)}exports.hideElement=u;exports.showElement=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../types/box.cjs.js"),l=require("../types/time.cjs.js");function h(t,{duration:s=l.durationDefault,from:e=r.boxPositions[0]}={}){if(!t)return;const i=e==="top"||e==="bottom",{scrollHeight:o,scrollWidth:n}=t;t.style.display="",requestAnimationFrame(()=>{i?t.style.height=`${o}px`:t.style.width=`${n}px`,setTimeout(()=>{i?t.style.height="auto":t.style.width="auto"},s)})}function u(t,{duration:s=l.durationDefault,from:e=r.boxPositions[0]}={}){if(!t)return;const i=e==="top"||e==="bottom",{scrollHeight:o,scrollWidth:n,style:{transition:a}}=t;t.style.transition="",requestAnimationFrame(()=>{i?t.style.height=`${o}px`:t.style.width=`${n}px`,t.style.transition=a,requestAnimationFrame(()=>{i?t.style.height="0":t.style.width="0"})}),setTimeout(()=>{t.style.display="none"},s)}exports.hideElement=u;exports.showElement=h;
@@ -1,8 +1,7 @@
1
1
  import { BoxPosition } from '../types/box';
2
2
  export interface TransitionProps {
3
- el?: HTMLElement | null;
4
3
  duration?: number;
5
4
  from?: BoxPosition;
6
5
  }
7
- export declare function showElement({ el, duration, from, }: TransitionProps): void;
8
- export declare function hideElement({ el, duration, from, }: TransitionProps): void;
6
+ export declare function showElement(el?: HTMLElement | null, { duration, from, }?: TransitionProps): void;
7
+ export declare function hideElement(el?: HTMLElement | null, { duration, from, }?: TransitionProps): void;
@@ -1,10 +1,9 @@
1
1
  import { boxPositions as r } from "../types/box.es.js";
2
2
  import { durationDefault as h } from "../types/time.es.js";
3
- function m({
4
- el: t,
3
+ function m(t, {
5
4
  duration: s = h,
6
5
  from: i = r[0]
7
- }) {
6
+ } = {}) {
8
7
  if (!t)
9
8
  return;
10
9
  const e = i === "top" || i === "bottom", { scrollHeight: o, scrollWidth: n } = t;
@@ -14,11 +13,10 @@ function m({
14
13
  }, s);
15
14
  });
16
15
  }
17
- function u({
18
- el: t,
16
+ function u(t, {
19
17
  duration: s = h,
20
18
  from: i = r[0]
21
- }) {
19
+ } = {}) {
22
20
  if (!t)
23
21
  return;
24
22
  const e = i === "top" || i === "bottom", { scrollHeight: o, scrollWidth: n, style: { transition: l } } = t;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@appartmint/tsm-mint",
3
3
  "author": "App Art Mint LLC",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "license": "MIT",
6
6
  "description": "TypeScript Modules from App Art Mint LLC",
7
7
  "keywords": [