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 🙏

© 2025 – Pkg Stats / Ryan Hefner

nuxt-data-mngr

v0.1.18

Published

A Nuxt module for creating editable content

Readme

Nuxt data manager ⚙️ (in development yet)

A nuxt module with easy to use components for creating editable content and storing them in a kv database using nitro.

Features

  • edit simple text in an input field

Styling ✨

All components are unstyled by default, except for some basic styles. You can easily add your own styles or use a CSS framework like Tailwind CSS to style the components.

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add nuxt-data-mngr

That's it! You can now use the nuxt data manager in your Nuxt app ✨

Styled / Unstyled

You can use this module with or without styles.

If you want to also have styled html tags (e.g. <h1>, <p>, etc.) you can enable the suiProse option and add the class sui-prose to a parent element. This will add styles to the html tags used in the editable content.

Just configure the module in your nuxt.config.ts file:

  editableContent: {
    storageKey: 'data',
    styled: true,
    suiProse: true,
    auth: {
      routeRules: [
        {
          // allow all get requests
          roles: ['*'],
          url: /^\/api\/editable\/.*/,
          method: 'GET',
        },
        {
          // editable route ('/api/editable/*')
          roles: ['admin'],
          url: /^\/api\/editable\/.*/,
          method: 'POST',
        },
      ],
      initUsers: [
        {
          id: '1',
          username: 'admin',
          pwd: 'admin123',
          role: 'admin',
          tokens: [],
        },
      ],
    },
  },

Usage 💡

Components

Most components have an admin version that is used for editing content. The admin versions ends with Admin, e.g. <EditableContentAdmin>.

Editable

  • <EditableContentIndex>
  • <EditableContentAdmin>
  • <EditableContentAreaIndex>
  • <EditableContentAreaAdmin>
  • <EditableSaveBtn>

Notification

  • <NotificationTime>
  • <NotificationTest>
  • <NotificationTypeIcon>
  • <NotificationItem>
  • <NotificationStack>

Tiptap

  • <TiptapMyMenu>
  • <TiptapNav>
  • <TiptapEditorWrapper>

Ui

  • <UiAnimatedMenuIcon>
  • <UiList>
  • <UiBtnGroup>
  • <UiStyle>
  • <UiBtn>
  • <UiSmartHeader>
  • <UiHeader>
  • <UiThemeSwitch>
  • <UiSwitch>
  • <UiSwitchCrossed>
  • <UiTooltip>
  • <UiSeperator>
  • <UiTest>
  • <UiOptions>

Auth

  • <AuthLogin>

Composables

  • useSaveHandler: A composable for handling save operations.

Example

<script setup lang="ts">
const saveHandler = useSaveHandler();

const _save = async () => {
  console.log("Saving all changes...");
  await saveHandler.saveAll();
};
</script>

<template>
  <main>
    <EditableSaveBtn />
    <h1 class="text-2xl font-bold text-center my-4">
      <EditableContentAdmin
        content-id="heading-text"
        class="text-center w-fit"
      />
    </h1>
    <EditableContentAreaAdmin content-id="area-a" class="text-center w-fit" />
  </main>
</template>

<style scoped>
textarea:focus,
input:focus {
  outline: none;
}
</style>

TODO

  • [x] WYSIWYG editor Component

  • [ ] Notification Service

  • [ ] layout component

  • [ ] file upload component

  • [ ] styling in progress

    • [x] add basic styles
    • [x] dark mode
    • [ ] add support for custom themes
    • [ ] styling completed
    • [ ] advanced styling
  • [ ] Layout component/solution

  • [ ] image upload component

  • [ ] List component (cards, grid, etc.)

  • [ ] auth <in progress 😎>

  • [ ] auth: add support for route based auth rules

    • [x] login
    • [ ] logout
    • [x] cookie based session management
    • [x] route based auth rules
    • [ ] extendable auth rules and type system