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

@josecortez1/c42-vue

v0.1.0

Published

Vue 3 wrappers for @josecortez1/c42-core headless controllers.

Downloads

141

Readme

@josecortez1/c42-vue

Vue 3 wrappers for @josecortez1/c42-core headless controllers.

Every non‑presentational @josecortez1/c42-core controller gets a thin Vue component whose props mirror the controller options and whose events mirror the controller events (re‑emitted with the original CustomEvent.detail as payload). The controller is mounted on the component's root element; you provide the markup in the default slot.

The wrappers are generated from packages/core/manifest.json — see Regenerating.

Install

npm install @josecortez1/c42-vue @josecortez1/c42-core vue

vue (>=3.3) and @josecortez1/c42-core are peer dependencies.

useC42 composable

The low‑level building block. Bind any @josecortez1/c42-core controller to an element:

<script setup lang="ts">
import { ref } from 'vue';
import { Accordion } from '@josecortez1/c42-core/accordion';
import { useC42 } from '@josecortez1/c42-vue';
import '@josecortez1/c42-core/accordion/style.css';

const multiple = ref(true);
// Pass a getter so option changes stay reactive.
const el = useC42(Accordion, () => ({ multiple: multiple.value }));
</script>

<template>
  <div :ref="el">
    <div data-c42-accordion-item data-value="a">
      <button data-c42-accordion-trigger>Title</button>
      <div data-c42-accordion-panel>Content</div>
    </div>
  </div>
</template>
  • The controller is instantiated in onMounted (SSR‑safe — nothing runs on the server) and destroyed in onUnmounted.
  • When the reactive options change, the controller's update() is called if it exists; otherwise the instance is destroyed and re‑created.

Generated components

Each controller also ships as a ready‑made component. Props are the controller options; listen to controller events with @:

<script setup lang="ts">
import { Accordion } from '@josecortez1/c42-vue';
import '@josecortez1/c42-core/accordion/style.css';

function onChange(detail: { value: string[] }) {
  console.log('open panels:', detail.value);
}
</script>

<template>
  <Accordion :multiple="true" @accordion:change="onChange">
    <div data-c42-accordion-item data-value="a">
      <button data-c42-accordion-trigger>Title</button>
      <div data-c42-accordion-panel>Content</div>
    </div>
  </Accordion>
</template>

Note: component names follow the underlying controller class, so a few differ from the manifest id — choiceCheckbox, toastToaster.

Regenerating

After the core manifest changes, regenerate the wrappers:

node scripts/generate-wrappers.mjs
# or
npm run generate

This rewrites src/components/*.ts, src/components/index.ts and src/index.ts. Do not edit the generated files by hand.

Build

npm run build

License

MIT © Laravel42