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

multivendor-dropshipping-ui

v0.0.4

Published

Seller CJ + PrintVally + Qikink dropshipping UI (env-gated), for multivendor SaaS seller apps

Readme

multivendor-dropshipping-ui

Seller UI for CJ Dropshipping, PrintVally, and Qikink, gated by a deploy-time env flag.

Build exception: This is a React component package. It ships dual CJS+ESM via tsup (not the data-client CJS-only tsc scaffold) so react / react-dom stay peerDependencies and the host shares a single React instance (Context-safe).

Gating model

VITE_DROPSHIPPING_PROVIDERS is a platform-operator decision at build/deploy time, not a per-seller toggle. Every seller on that deployment sees the same providers.

| Env value | Result | |-----------|--------| | cj | CJ only | | printvally | PrintVally only | | qikink | Qikink only | | cj,printvally,qikink | All three | | empty / unset | None |

Paths are fixed in v1: /cj, /printvally, /qikink (not configurable).

Host integration

import {
  configureDropshippingUi,
  parseDropshippingProviders,
  getDropshippingNavItems,
  getDropshippingSubNavItems,
  DropshippingThemeProvider,
} from 'multivendor-dropshipping-ui';
// Optional (pulls provider lazy graphs — prefer host-side subpath imports in Vite):
import { createDropshippingRoutes } from 'multivendor-dropshipping-ui/routes';

configureDropshippingUi({
  productApi: productAPI,
  cjApi: cjAPI,
  printvallyApi: printvallyAPI,
  qikinkApi: qikinkAPI,
});

const providers = parseDropshippingProviders(import.meta.env.VITE_DROPSHIPPING_PROVIDERS);

// Nav: append getDropshippingNavItems(providers) **inside** SellerLayout useMemo (deps include providers).
// Sub-nav: getDropshippingSubNavItems(pathname, providers) inside subNavigationItems useMemo.

// Theme bridge
<DropshippingThemeProvider isDarkMode={isDarkMode}>...</DropshippingThemeProvider>

In Vite hosts, mount multivendor-dropshipping-ui/cj, .../printvally, and .../qikink with compile-time flags (see seller-ui createSellerDropshippingRoutes + vite define) so a disabled provider is omitted from the Rollup graph. Do not import multivendor-dropshipping-ui/routes from the main app entry if you need env-based exclusion — that module always references all provider lazy imports.

React dual-instance check

  1. peerDependencies: react, react-dom, react-router-dom — never bundle them.
  2. Host Vite: resolve.dedupe: ['react', 'react-dom'].
  3. Dev: DropshippingThemeProvider logs if two React copies are detected.
  4. After seller production build, confirm a single React in vendor chunk:
# from seller-ui after vite build
rg -l "react" dist/assets/*vendor-react* | head
# package dist must not contain a nested react copy:
rg "node_modules/react/" dist/ --glob '*.js' || true
ls node_modules/multivendor-dropshipping-ui/dist | head
# ensure package externals left react out of its bundle:
! rg -q 'from "react"' node_modules/multivendor-dropshipping-ui/dist/index.js && echo 'unexpected: no react import'
rg -n 'from ["'\'']react["'\'']' node_modules/multivendor-dropshipping-ui/dist/index.js | head

The package must import react as an external (from "react"), not inline React source.

API boundary

The package does not own axios. Inject thin clients matching seller printvallyAPI / cjAPI / qikinkAPI / productAPI via configureDropshippingUi.