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
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 point | Purpose |
|---|---|
@picsart/runtime/client | Kernel: createRuntime, createStore, getMiniappDeeplink, createFetchOverrider |
@picsart/runtime/adapters/web-layering | Picsart web-layering rendering engine |
@picsart/runtime/adapters/headless | Zero-overhead no-op rendering engine |
@picsart/runtime/providers/react | RuntimeProviders, useRuntimeServices |
@picsart/runtime/providers/react/adapters/growth-rc | Growth / remote-config adapter |
@picsart/runtime/providers/react/adapters/pulse | Pulse analytics adapter |
@picsart/runtime/providers/react/adapters/error-boundary | Error-boundary adapter |
@picsart/runtime/providers/react/adapters/intl | Internationalization adapter |
@picsart/runtime/providers/react/adapters/design-system | Design-system adapter |
@picsart/runtime/providers/react/adapters/no-network | Offline / no-network adapter |
@picsart/runtime/providers/react/adapters/monetization | Monetization / checkout adapter |
@picsart/runtime/providers/react/full | All-in-one FullRuntimeProviders |
@picsart/runtime/providers/react/embedded | EmbeddedRuntimeProvider, plus useRuntimeServices / IRuntimeServices |
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/embedded — not from
@picsart/runtime/providers/react.
Requirements
- Node.js ≥ 20
- A bundler that understands ESM and the package
exportsfield (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. Vitedefine); they are not runtime props. See Environment Variables.