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

@hyvor/hyvor-talk-base

v1.0.1

Published

This library provides types and helper functions for creating [Hyvor Talk](https://talk.hyvor.com) Web Components.

Readme

This library provides types and helper functions for creating Hyvor Talk Web Components.

Installation

npm install @hyvor/hyvor-talk-base

Comments

Add comments embed (<hyvor-talk-comments>):

import { Comments } from "@hyvor/hyvor-talk-base";

Comments.comments(
    // The same attributes as the base web component
    // See https://talk.hyvor.com/docs/comments#attributes
    {
        "website-id": 1,
        "page-id": "unique-page-id",
    },
    // The container element
    document.getElementById("comments-container"),
    // Callback for events
    // See https://talk.hyvor.com/docs/comments#events
    (event, data) => {
        console.log(event, data);
    }
);

Comment Counts

Add comment count elements (<hyvor-talk-comment-count>):

import { CommentCounts } from "@hyvor/hyvor-talk-base";

// first, add the elements
CommentCounts.commentCount(
    {
        "page-id": "unique-page-id",
    },
    wrap1
);

CommentCounts.commentCount(
    {
        "page-id": "unique-page-id",
    },
    wrap2
);

// then, load the counts
CommentCounts.load({
    "website-id": 1,
});

Newsletters

Add newsletter form (<hyvor-talk-newsletter>):

import { Newsletters } from "@hyvor/hyvor-talk-base";

Newsletters.form(
    // The same attributes as the <hyvor-talk-newsletter> component
    // See https://talk.hyvor.com/docs/newsletters#form-properties
    {
        "website-id": 1,
        title: "Subscribe to our newsletter",
    },
    wrap // The container element
);

Memberships

Add the memberships embed (<hyvor-talk-memberships>):

import { Memberships } from "@hyvor/hyvor-talk-base";

Memberships.memberships(
    // The same attributes as the <hyvor-talk-memberships> component
    // See https://talk.hyvor.com/docs/memberships#component-attributes
    {
        "website-id": 1,
        "sso-user": "{}",
        "sso-hash": "hash",
    }
);

Once you have added the memberships embed, you can add gated content (<hyvor-talk-gated-content>):

import { Memberships } from "@hyvor/hyvor-talk-base";

Memberships.gatedContent(
    // The same attributes as the <hyvor-talk-gated-content> component
    // See https://talk.hyvor.com/docs/gated-content#component-attributes
    {
        key: "content-key",
    },
    wrap // The container element
);

Legacy Functions

The following functions are only available for legacy purposes. We recommend using the functions above for new projects.

addComments(props, container, onEvent)

Adds <hyvor-talk-comments> (docs) to the given container.

import { addComments } from "@hyvor/hyvor-talk-base";

addComments(
    {
        "website-id": 1,
        "page-id": "unique-page-id",
    },
    document.getElementById("comments-container"),
    (event, data) => {
        console.log(event, data);
    }
);

addCommentCounts(props)

Adds the script that registers the <hyvor-talk-comment-count> custom element to the page. Note that unlike addComments, this function does not add the element to the page. You need to add <hyvor-talk-comment-count> elements to the page manually, and then call this function to load the comment counts.

import { addCommentCounts } from "@hyvor/hyvor-talk-base";

addCommentCounts({
    "website-id": 1,
    "page-id": "unique-page-id",
});

Example usage with React:

export function CommentCount(props: CommentCountProps) {
    useEffect(() => addCommentCounts(props), []);
    return <hyvor-talk-comment-count {...props} />;
}

addCommentCounts function automatically calls loadCommentCounts if loading="manual" is not set.

loadCommentCounts(props)

Loads comment counts from Hyvor Talk servers and updates the <hyvor-talk-comment-count> elements. See the docs for more information on optimized usage.

import { loadCommentCounts } from "@hyvor/hyvor-talk-base";

loadCommentCounts({
    "website-id": 1,
});