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

@vactorynext/core

v1.0.21

Published

The `@vactorynext/core` package centralizes various components and functionalities used across Vactory and other VOID projects. This package includes a wide range of elements such as Contexts, Hooks, Lib, Block, and Paragraph components, ensuring consiste

Downloads

342

Readme

@vactorynext/core

The @vactorynext/core package centralizes various components and functionalities used across Vactory and other VOID projects. This package includes a wide range of elements such as Contexts, Hooks, Lib, Block, and Paragraph components, ensuring consistency and ease of maintenance across different implementations.

The introduction of @vactorynext/core addresses the challenge of manual updates in multiple projects for any changes, refactorings, or fixes. It serves as a central workspace, allowing for easy synchronization across projects through package updates.

Features

The @vactorynext/core package offers a comprehensive set of methods and components:

  • Blocks: JSX components for block elements.
  • Paragraphs: JSX components for paragraph elements.
  • Drupal: Functionalities specific to Drupal integration.
  • Hooks: A collection of custom React hooks.
  • Context: React custom context functionalities.
  • Lib: Library functions for various features.
  • Utils: Utility functions including date formatting, UI elements functionalities, and more.
  • Webform: Hooks and functions for webform management.
  • Server: Server-only functions, optimized for SSR processes.
  • Fetch Intercept: Intercepts fetch errors

Installation

To install the package, use the following command with yarn:

yarn add @vactorynext/core -W

Usage

To use @vactorynext/core, simply import the desired functionality or component into your project. Below are examples for each type of import provided by the package. Make sure to specify the correct path related to each feature:

Importing Blocks

import { BlocksController } from "@vactorynext/core/blocks"

Importing Paragraphs

import { ParagraphsController } from "@vactorynext/core/paragraphs"

Drupal Integration

import { drupal } from "@vactorynext/core/drupal"

Custom Hooks

import { useI18n } from "@vactorynext/core/hooks"

Context Usage

import { MenuProvider } from "@vactorynext/core/context"

Library Functions

import { removeQueryParamValue } from "@vactorynext/core/lib"

Utility Functions

import { vclsx } from "@vactorynext/core/utils"
import { ErrorBoundary } from "@vactorynext/core/utils"

Webform Hooks and Functions

import { useErrorMessage } from "@vactorynext/core/webform"

Server-only Functions

import { redis } from "@vactorynext/core/server"

Fetch Interceptor

const FetchInterceptor = dynamic(
	() => import("@vactorynext/core/fetch-intercept").then((mod) => mod.FetchInterceptor),
	{ ssr: false }
)

Contributing

We warmly welcome contributions to the @vactorynext/core package. If you're looking to contribute, please follow these steps to ensure a smooth process:

  1. Clone: The change can only be made in Vactory Next project

  2. Make Changes Locally:

    • Navigate to the packages/core/src folder in your local repository.
    • Implement your changes or enhancements here.
    • For new path alias folders, ensure to add these in the files array in package.json to include them in the package.
  3. Run Tests:

    • Before committing your changes, run any existing tests to make sure everything still works as expected (dev, build, storybook:dev, storybook:build, lint & docker for production environment).
  4. Update Documentation:

    • If your changes involve adding new features or modifying existing ones, update the relevant documentation and examples in the README.md or other documentation files.
  5. Commit Your Changes:

    • Commit your changes with a clear and descriptive commit message. This helps others understand the purpose and context of your changes.
  6. Create a Pull Request (PR):

    • Push your changes to your branch and create a pull request against the feature/v3 repository.
    • In the PR description, provide detailed information about your changes. Highlight any important aspects or considerations related to your contribution.
    • Make sure your PR title and description are clear and concise, giving maintainers a good understanding of your contribution.
  7. PR Review:

    • Once submitted, your PR will be reviewed by the maintainers or the package's responsible person.
    • Engage in discussions or make further changes if requested by the reviewers.
  8. Merging and Publishing:

    • After your PR is approved and merged, the package's maintainer will handle publishing a new version with your changes.

Notes for Contributors:

  • Please adhere to the coding style and standards used in the project.

License

@vactorynext/core is licensed under MIT License.