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

@iankibetsh/shframework

v5.9.2

Published

Vue library for handling laravel backend

Downloads

748

Readme

SH Framework (@iankibetsh/shframework)

npm version

A powerful Vue 3 library for rapid application development, specifically designed to integrate seamlessly with Laravel-based backends.

🚀 Installation

Install the package using npm:

npm install @iankibetsh/shframework

🛠 Core Components

1. ShTable

A robust table component that handles server-side pagination, searching, and custom formatting.

  • Nested Key Support: Access nested properties using dot notation (e.g., user.name).
  • Auto-Label Generation: Automatically generates human-readable labels from keys if not explicitly provided (e.g., user.first_name becomes "First Name").
  • Named Slots for Custom Formatting: Use named slots for columns to provide custom formatting (e.g., <template #age="{ row }">).
  • Multi-Action Support: Enable row selection and collective operations with a floating action bar.
  • Caching & Background Loading: Uses IndexedDB to cache data. Shows cached data immediately while fetching fresh data in the background (enabled via enableTableCache config or :cache="true" prop).
  • User-Specific Caching: Automatically prefixes cache keys with user identifiers (e.g., id, email) to ensure data isolation between users. Configure via cacheUserFields.
  • Metadata Tracking: Tracks cache source URLs and timestamps in a dedicated cache_metadata store for better auditability.
  • Links & Actions: Easily define column links and action buttons.
<sh-table :headers="['id', 'user.name', 'email']" end-point="users/list">
  <template #user.name="{ row }">
    <strong>{{ row.user.name }}</strong>
  </template>
</sh-table>

Multi-Action Support

Enable multi-row selection and perform collective actions by passing the multi-actions prop.

<sh-table
  :headers="['id', 'name']"
  end-point="users/list"
  :multi-actions="[
    {
      label: 'Delete Selected',
      class: 'btn-outline-danger',
      icon: 'bi-trash',
      permission: 'delete_users',
      callback: (selectedRecords) => {
        // Handle action, e.g., send IDs to backend
        const ids = selectedRecords.map(r => r.id);
        console.log('Selected IDs:', ids);
      }
    }
  ]"
/>

2. ShAutoForm

The flagship component for generating complex forms from simple configurations.

  • Auto-Detection: Infers input types from field names (email, phone, date, etc.).
  • Multi-Step Support: Break long forms into logical steps with progress indicators.
  • Validation: Seamlessly handles and displays Laravel validation errors (422).
  • Conditional Visibility: Hide the submit button using :hide-submit-button="true".
  • Modern Reactivity: Built using Vue 3.4's defineModel for clean, conflict-free two-way binding.
<sh-auto-form
  :fields="[
    { field: 'name', label: 'Name', required: true },
    { field: 'email', type: 'email', label: 'Email', required: true },
    { field: 'password', type: 'password', label: 'Password' },
    { field: 'gender', type: 'select', label: 'Gender' }
  ]"
  :action="getActionUrl('register')"
  :successCallback="onRegistered"
/>

3. ShForm

The underlying engine for ShAutoForm, used for more granular control over form layouts and field types.

4. ShModalForm

A convenience component that wraps a trigger button, a Bootstrap modal, and an ShForm into one.

<sh-modal-form
  modal-id="addTaskModal"
  modal-title="Create New Task"
  :fields="[
    { field: 'title', label: 'Task Title', required: true },
    { field: 'description', type: 'textarea', label: 'Description' }
  ]"
  :action="getActionUrl('storeTask')"
>
  Add Task
</sh-modal-form>

🏗 Helpers & Utilities

shApis

A thin wrapper around Axios for making API requests. It uses VITE_APP_API_URL from your .env as the base.

  • shApis.doGet(endpoint, params)
  • shApis.doPost(endpoint, data)

shRepo

A collection of common UI and data utilities.

  • shRepo.runPlainRequest(url, message): Post request with a confirmation prompt.
  • shRepo.runSilentRequest(url): Direct post request without prompt.
  • shRepo.showToast(message, type): Displays a sweetalert2 toast.
  • shRepo.flushCache(): Clears all IndexedDB cache data.
  • shRepo.swalSuccess(message) / shRepo.swalError(message): Standard success/error popups.

shUser (State Management)

Pinia-based store for managing authenticated user state and sessions.

import { useUserStore } from "@iankibetsh/shframework";
const userStore = useUserStore();

userStore.setUser(); // Fetches current user
userStore.logOut(); // Clears session and local storage

📄 Documentation

For full details, property lists, and advanced usage, visit our documentation:

👉 https://frontend-documentation.pages.dev/

License

MIT