Skip to main content

Installation

@picsart/runtime is published to the Picsart GitLab npm registry. Scoped @picsart/* packages require registry authentication.

Registry authentication

Add the scope to your .npmrc (the runtime uses ${WEB_ACCESS_TOKEN} interpolation so the same file works locally and in CI/Docker):

@picsart:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=${WEB_ACCESS_TOKEN}

Install

npm ci # reproducible install from the lockfile
# or, when adding it to a host for the first time:
npm install @picsart/runtime
Branch builds

Picsart libraries use semantic-release with branch-based dist-tags. To install a specific branch build, resolve its tag first rather than guessing a version:

npm view @picsart/runtime dist-tags
npm install @picsart/runtime@<branch-tag>

Entry points

The package ships 13 entry points as separate ESM bundles. Import only what your host composes:

Entry pointPurpose
@picsart/runtime/clientKernel: createRuntime, createStore, getMiniappDeeplink, createFetchOverrider
@picsart/runtime/adapters/web-layeringPicsart web-layering rendering engine
@picsart/runtime/adapters/headlessZero-overhead no-op rendering engine
@picsart/runtime/providers/reactRuntimeProviders, useRuntimeServices
@picsart/runtime/providers/react/adapters/growth-rcGrowth / remote-config adapter
@picsart/runtime/providers/react/adapters/pulsePulse analytics adapter
@picsart/runtime/providers/react/adapters/error-boundaryError-boundary adapter
@picsart/runtime/providers/react/adapters/intlInternationalization adapter
@picsart/runtime/providers/react/adapters/design-systemDesign-system adapter
@picsart/runtime/providers/react/adapters/no-networkOffline / no-network adapter
@picsart/runtime/providers/react/adapters/monetizationMonetization / checkout adapter
@picsart/runtime/providers/react/fullAll-in-one FullRuntimeProviders
@picsart/runtime/providers/react/embeddedEmbeddedRuntimeProvider, plus useRuntimeServices / IRuntimeServices
Context identity caveat

Each entry point is built as a separate Rollup bundle, so a createContext reachable from two entries becomes two distinct instances at runtime. useRuntimeServices must be imported from the same entry as the provider that fills it. With EmbeddedRuntimeProvider, import useRuntimeServices from @picsart/runtime/providers/react/embeddednot from @picsart/runtime/providers/react.

Requirements

  • Node.js ≥ 20
  • A bundler that understands ESM and the package exports field (Vite, Rollup, webpack 5, Next.js, …).
  • Picsart libraries read process.env.REACT_APP_* at module-evaluation time. Forward those values at build time (e.g. Vite define); they are not runtime props. See Environment Variables.