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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@deepdanci/common

v0.3.0

Published

DeepDanci UI common components for Next.js

Downloads

34

Readme

@deepdanci/common

Next.js UI component library with Tailwind CSS and Supabase integration.

安装

npm install @deepdanci/common
# 或
yarn add @deepdanci/common
# 或
pnpm add @deepdanci/common

使用方法

重要:关于样式兼容性

组件库中使用了特定的 Tailwind CSS 类名配置。为了确保样式正确渲染,请注意:

  1. 确保您的项目使用 Tailwind CSS
  2. 对于自定义颜色,请使用大写十六进制值,如 #FF6600 而非 #ff6600
  3. 组件中使用了标准颜色名称(如 text-gray-500)而非主题变量(如 text-muted-foreground

重要:样式设置

确保在项目中导入组件库的样式:

// 在项目的入口文件 (如 _app.tsx 或 layout.tsx) 中导入样式
import "@deepdanci/common/dist/styles/index.css";

// 也需要确保您的项目已正确配置 Tailwind CSS

方式一:使用命名导入(推荐)

import {
  Button,
  Dialog,
  ScrollArea,
  PromotionalHeader,
} from "@deepdanci/common";
import { createClient } from "@supabase/supabase-js";

// 创建 Supabase 客户端
const supabaseClient = createClient(
  "https://your-project-url.supabase.co",
  "your-supabase-anon-key"
);

// 在组件中使用
function MyComponent() {
  return (
    <div>
      <PromotionalHeader supabaseClient={supabaseClient} />

      <Button variant='default'>点击我</Button>

      <ScrollArea className='h-[200px]'>{/* 内容 */}</ScrollArea>
    </div>
  );
}

方式二:直接导入 PromotionalHeader 组件

如果您在导入 PromotionalHeader 时遇到问题,可以使用直接导入方式:

// 直接从子路径导入
import { PromotionalHeader } from "@deepdanci/common/components/promotional-header";
// 或者默认导入
import PromotionalHeader from "@deepdanci/common/components/promotional-header";

// 使用方式
function MyComponent({ supabaseClient }) {
  return <PromotionalHeader supabaseClient={supabaseClient} />;
}

兼容性说明

  • 支持 React 18 及以上版本
  • 支持 Next.js 14 及以上版本
  • 如果遇到构建错误,尝试清除项目缓存:
    # 删除 Next.js 缓存
    rm -rf .next
    # 或在 Windows 中
    rmdir /s /q .next

组件列表

  • Button - 按钮组件
  • Dialog - 对话框组件
  • ScrollArea - 滚动区域组件
  • PromotionalHeader - 促销头部组件(需要 Supabase 客户端)

要求

  • React 18 或更高版本
  • Next.js 14 或更高版本
  • Tailwind CSS 4

开发

# 安装依赖
yarn

# 开发模式运行
yarn dev

# 构建组件库
yarn build:package

License

MIT