npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dble-test

v0.0.9

Published

패키지 설명 내용 ....

Downloads

449

Readme

GitHub

배포 후 Install 셋팅

npm install package-name

yarn add package-name

배포 방법

  1. package.json >> version 설정
  2. padkage.json >> description / repository.url / keywords 수정
  3. vite.config.ts >> build > lib > name 수정
  4. src > package > index.tsx 내에 배포할 패키지 export로 반환 셋팅
  5. npm login >> npm 로그인
  6. npm publish >> 패키지 버전 배포

License

MIT © Deepfactory, Inc. See LICENSE for details.

/*_ @jsxImportSource @emotion/react _/ import { cx } from '@emotion/css'; import { css } from '@emotion/react'; import React, { ComponentPropsWithoutRef, useMemo } from 'react'; import { backgroundStylesProps } from '../styles/bgStylesProps'; import { borderStylesProps } from '../styles/borderStylesProps'; import { flexStylesProps } from '../styles/flexStylesProps'; import { gradientStylesProps } from '../styles/gradientStylesProps'; import { screenSizeStylesProps } from '../styles/screenSizeStylesProps'; import { shadowStylesProps } from '../styles/shadowStylesProps'; import { spaceStylesProps } from '../styles/spaceStylesProps'; import { ScrollLayerElementType, ScrollLayerPropsType, ScrollLayerType } from '../types/props/ScrollLayerPropsType'; import { mediaScreenSize } from '../utils/mediaScreenSize';

const ScrollLayer = React.memo( ({ as, children, className, display, sizes, flex, padding, margin, borderRadius, border, background, gradient, opacity, shadow, zIndex, transition = { time: 0.25, type: 'ease-in-out' }, mq = {}, css: cssProp, ...rest }: ScrollLayerPropsType & ComponentPropsWithoutRef) => { const pPs = { display, sizes, flex: display === 'flex' || !display ? flex : undefined, padding, margin, border, borderRadius, background, gradient, opacity, shadow, };

const Component = as || 'div';

//
// extended props styles
const ExtendedStyles = (props: ScrollLayerType) => {
  return {
    display: props.display,
    opacity: props.opacity,
    ...screenSizeStylesProps(props.sizes),
    ...((props.display === 'flex' || !props.display) && flexStylesProps(props.flex)),
    ...spaceStylesProps({ padding: props.padding, margin: props.margin }),
    ...borderStylesProps({ border: props.border, borderRadius: props.borderRadius }),
    ...backgroundStylesProps(props.background),
    ...gradientStylesProps(props.gradient),
    ...shadowStylesProps(props.shadow),
  };
};

//
// base style
const baseStyle = useMemo(
  () =>
    css({
      transition: `all ${transition.time || 0.25}s ${transition.type || 'ease-in-out'}`,
      listStyle: 'none',
      outline: 'none',
      zIndex,
    }),
  [transition, zIndex],
);

//
// media-query styles
const mediaStyles = useMemo(
  () =>
    mediaScreenSize.map(size => {
      const breakpointKey = `w${size}` as keyof typeof mq;
      const styles = mq?.[breakpointKey];

      return css`
        @media (max-width: ${size}px) {
          ${styles ? ExtendedStyles(styles) : ''}
        }
      `;
    }),
  [mq],
);

//
// combined styles
const combinedStyles = useMemo(
  () => css`
    ${baseStyle}
    ${ExtendedStyles({
      ...pPs,
      display: pPs.display ?? 'flex',
      sizes: { ...pPs.sizes, width: pPs.sizes?.width ?? '100%' },
      flex:
        pPs.display === 'flex' || !pPs.display
          ? { ...pPs.flex, direction: pPs.flex?.direction ?? 'column' }
          : undefined,
      gradient: { ...pPs.gradient, type: pPs.gradient?.type ?? 'linear' } as any,
      border: {
        ...pPs.border,
        stroke: pPs.border?.stroke ?? 0,
        color: pPs.border?.color ?? 'transparent',
        shape: pPs.border?.shape ?? 'solid',
      } as any,
    })}
${mediaStyles}
${cssProp}
  `,
  [baseStyle, pPs, mediaStyles, cssProp],
);

const combinedClassName = cx('dble-scroll-layer', className);
return (
  <Component className={combinedClassName} css={combinedStyles} {...(rest as any)}>
    {children}
  </Component>
);

}, );

export { ScrollLayer };