Installation
Install the packages in your application and prepare your browser build for WebGL2 and module workers.
Install packages in your application. Local files need no upload endpoint or bucket.
1. Connect the Private Registry
Get the package project’s numeric ID and a package-read token from your provider. Replace PROJECT_ID in both lines of your app’s .npmrc:
@bs:registry=https://gitlab.brightskiesinc.com/api/v4/projects/PROJECT_ID/packages/npm/
//gitlab.brightskiesinc.com/api/v4/projects/PROJECT_ID/packages/npm/:_authToken=${GITLAB_NPM_TOKEN}
Set GITLAB_NPM_TOKEN through your environment or secret manager. Never place it in browser code or commit it.
2. Install Your Packages
For local files with React views:
npm install @bs/[email protected] @bs/[email protected] @bs/[email protected]
React views support React 18.3 or 19, with matching React DOM. For a framework-free app, install core; add readers for file parsing.
3. Mount a View
Follow Your First React Section. Give the view a nonzero height, such as style={{ height: 480 }}.
| Import | Use |
|---|---|
@bs/outkrop-core |
Engine, layers and data providers |
@bs/outkrop-react |
Views, surface and hooks |
@bs/outkrop-readers |
Direct parsers and byte sources |
@bs/outkrop-readers/browser |
Worker-backed local sessions |
Check Your Environment
- Browser: WebGL2 for rendering; module workers and File/Blob APIs for local sessions.
- Bundler: Vite or webpack, including emitted worker assets in deployment. No source aliases or worker URL rewrites.
- SSR: imports are safe; create engines and open files on the client. Next.js hook/callback components need
'use client'; Astro islands need hydration. - CSP: allow your emitted scripts and workers from their origin.
Resolve Setup Errors
| Symptom | Check |
|---|---|
| Registry 401/403 | Token and project permissions |
| Registry 404 | Project ID and published version |
| Blank view | Container height, WebGL2, onError |
| Files fail only in production | Worker assets, browser console, CSP |
| Old local path fails | Reopen the file in the current session |