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

@qwik-custom-elements/core

v1.0.3

Published

Generate typed, SSR-capable Qwik components from Web Component libraries (CLI + orchestration)

Readme

@qwik-custom-elements/core

Qwik does not natively provide server-side rendering support for custom elements. Without additional tooling, Web Components render as empty tags on the server, lose SSR benefits, and require manual boilerplate to integrate typed props and events. @qwik-custom-elements/core is the CLI and orchestration layer that generates typed, SSR-capable Qwik wrapper components from a Custom Elements Manifest — giving you correct server output, full type safety, and automatic event wiring, with no per-component boilerplate.

core does not contain framework-specific logic. Instead, it delegates generated output to an adapter that understands your component library (Stencil, Lit, etc.). You configure a project once; the CLI does the rest.

Ecosystem

This package is part of the qwik-custom-elements toolchain:

| Package | Role | | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | @qwik-custom-elements/core (this package) | CLI entry point and adapter-agnostic orchestration: config loading, CEM parsing, write planning, diagnostics | | @qwik-custom-elements/adapter-stencil | Stencil-specific generation: SSR/CSR bridge components, typed Qwik wrappers, hydrate runtime integration | | @qwik-custom-elements/adapter-lit | Lit-specific generation: SSR/CSR bridge components, typed Qwik wrappers, Declarative Shadow DOM hydration |

Install core alongside whichever adapter matches your component library. You will interact with core only through the config file and the CLI — all framework-specific behavior lives in the adapter.

Install

npm install @qwik-custom-elements/core

Quickstart

Create a qwik-custom-elements.config.json at your project root:

{
  "projects": [
    {
      "id": "my-lib",
      "adapter": "stencil",
      "adapterPackage": "@qwik-custom-elements/adapter-stencil",
      "source": {
        "type": "PACKAGE_NAME",
        "packageName": "my-stencil-lib"
      },
      "outDir": "./src/generated/my-lib"
    }
  ]
}

Then run the generator:

npx qwik-custom-elements

Generated Qwik wrapper files are written to the configured outDir. Re-run after upgrading the component library to regenerate.

Support Policy

This package follows semantic versioning. See COMPATIBILITY.md for the tested combinations of core, adapters, Qwik, and Node.js.

Breaking changes always include an explicit BREAKING section in the release notes and require an update to COMPATIBILITY.md before merging.

Ownership Boundary

@qwik-custom-elements/core owns the adapter-agnostic parts of generation:

  • config loading and validation
  • source discovery and path-safety checks
  • CEM parsing into typed component metadata
  • runtime-resolution orchestration and SSR capability coordination
  • write planning and execution orchestration
  • CLI entrypoints, summaries, and deterministic diagnostics

@qwik-custom-elements/core does not own framework-specific generated output shape.

In particular, core must not decide generated wrapper structure, generated barrel structure, runtime helper file shape, file extensions, or fallback wrapper generation based on adapter identity. Those responsibilities belong to adapters.

Current Exports

This package currently exports:

  • CLI helpers: parseCliArgs, runCli
  • config APIs: loadGeneratorConfig, validateGeneratorConfig, ConfigValidationError
  • generation APIs: generateFromConfig, GenerationError
  • public types for config, generation results, planned writes, and run summaries

Adapter Contract Direction

Core is responsible for producing one authoritative parsed component-metadata model and passing that metadata into adapter generation hooks.

Adapters are responsible for returning the generated file set for their frameworks.

Documentation Expectations

Changes that alter core or adapter ownership boundaries should be reflected in:

  • an ADR in docs/adr/ (system-wide) or the affected package's docs/adr/ (context-specific)
  • the affected CONTEXT.md if new domain terms are introduced
  • the package README files for any affected packages