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

galaxis-uiverse

v0.1.20

Published

A UI component library

Downloads

577

Readme

Uiverse

Uiverse is a UI component library designed to provide a set of reusable and customizable components for building modern web applications.

Table of Contents

Installation

To install Uiverse, use npm or yarn:

npm install galaxis-uiverse
yarn add galaxis-uiverse

Configuration

You can configure the Uiverse theme by providing a configuration object to the Uiverse. The configuration is optional, and the default theme is "dark".

import { Uiverse } from "galaxis-uiverse";

// Optional, you can use simple <Uiverse></Uiverse>
const config = {
  theme: "dark", // or "light"
};

function App() {
  return (
    <Uiverse config={config}>
      <PackageComponents />
    </Uiverse>
  );
}

Development Mode

To set up the project in development mode, follow these steps:

  1. Create a public folder: Create a public folder in the root directory of your project.

  2. Create an index.html: Inside the public folder, create an index.html file with the following content:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Uiverse</title>
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>
  1. Create an index.tsx: In the src folder, create an index.tsx file with the following content:
import React from "react";
import ReactDOM from "react-dom/client";
import { Uiverse } from "./uiverse";

const root = ReactDOM.createRoot(document.getElementById("root") as HTMLElement);
root.render(
  <React.StrictMode>
    <Uiverse>{/* You can import the developing component here */}</Uiverse>
  </React.StrictMode>
);
  1. Rename the src/index.ts: Rename the src/index.ts file to src/ignore-index.ts.

  2. Start the development server: Run the following command to start the development server:

npm run start
  1. Open the app in the browser: Open your browser and navigate to http://localhost:3000 to see your app in action.

Code Connect and Storybook

To create a new component and integrate it with Figma Code Connect and Storybook, follow these steps:

  1. Create a component: In the src/uiverse/components folder, create a new component file, e.g., my-component.component.tsx and create a styled wrapper for your component.

  2. Connect to Figma: Use the figma connect create https://www.figma.com/componentURL command to generate properties from Figma. Replace componentURL with your Figma component URL.

  3. Implement the component: Use the generated properties in your component implementation.

  4. Publish to Figma: After implementing the component or components, run the following command to publish your code to Figma figma connect publish.

  5. Create Storybook examples: Add examples for your component in Storybook. Create a new story file, e.g., my-component.stories.tsx.

  6. Run Storybook locally: To see your component in action, run the following command:

npm run storybook
  1. Publish to Chromatic: If everything looks good, publish your Storybook to Chromatic.
npm run chromatic

Environment Configuration

To configure the environment for publishing to Figma and Chromatic, create a .env file with the following properties:

FIGMA_ACCESS_TOKEN=your_figma_access_token
CHROMATIC_PROJECT_TOKEN=your_chromatic_project_token

To create a Figma access token, follow these steps:

  1. Go to the Figma website and log in to your account.
  2. Navigate to your account settings.
  3. Under the "Personal Access Tokens" section, click on "Create a new personal access token".
  4. Copy the generated token and use it in your .env file.

Publishing the Package

To publish the Uiverse package to npm, follow these steps:

  1. Build the package (this is optional because the publish command builds the project too): Run the following command to build the package.
npm run build
  1. Update the version: Use the scripts/release.ts script to update the version of the package. You can choose to increase the subversion, main version, core version, or set a custom version.

  2. Publish to npm: Run the following command to publish the package to npm.

npm publish

Make sure you have the necessary permissions and are logged in to your npm account before publishing.