# @open-pioneer/runtime

> Implements the runtime environment for Open Pioneer Trails apps.

Latest version **4.10.0** (published 2026-11-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @open-pioneer/runtime
pnpm add @open-pioneer/runtime
yarn add @open-pioneer/runtime
bun add @open-pioneer/runtime
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 4.10.0 |
| Published | 2026-11-19 |
| First published | 2023-06-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 11 |
| Unpacked size | 441 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 4 |
| Maintainers | mbeckem_conterra, jessebluemr, antoniave_conterra, open_pioneer |
| Keywords | open-pioneer-trails |

## Links

- npm: https://www.npmjs.com/package/@open-pioneer/runtime
- Repository: https://github.com/open-pioneer/trails-core-packages
- Homepage: https://github.com/open-pioneer
- npm.io page: https://npm.io/package/@open-pioneer/runtime

## Dependencies (11)

- [react](https://npm.io/package/react.md) ^19.3.1
- [react-dom](https://npm.io/package/react-dom.md) ^19.3.1
- [@emotion/cache](https://npm.io/package/@emotion/cache.md) ^11.14.0
- [@emotion/react](https://npm.io/package/@emotion/react.md) ^11.14.0
- [@formatjs/intl](https://npm.io/package/@formatjs/intl.md) ^6.1.5
- [@chakra-ui/react](https://npm.io/package/@chakra-ui/react.md) ^3.38.0
- [@open-pioneer/core](https://npm.io/package/@open-pioneer/core.md) 4.10.0
- [@open-pioneer/base-theme](https://npm.io/package/@open-pioneer/base-theme.md) 4.10.0
- [@open-pioneer/reactivity](https://npm.io/package/@open-pioneer/reactivity.md) 4.10.0
- [@conterra/reactivity-core](https://npm.io/package/@conterra/reactivity-core.md) ^0.8.9
- [@formatjs/intl-localematcher](https://npm.io/package/@formatjs/intl-localematcher.md) ^0.10.1

## Recent versions

- 4.10.0 (latest) — 2026-11-19
- 4.10.0-dev.20261119090001 (dev) — 2026-11-19
- 4.7.1-dev-test-snapshot-123.20260821142246 (dev-test-snapshot-123) — 2026-08-21
- 4.7.1-dev-test-snapshot.20260821120534 (dev-test-snapshot) — 2026-08-21
- 4.9.0 — 2026-10-30
- 4.9.0-dev.20261029090037 — 2026-10-29
- 4.9.0-dev.20261002130116 — 2026-10-02
- 4.9.0-dev.20260930055642 — 2026-09-30
- 4.8.0 — 2026-09-17
- 4.8.0-dev.20260910101405 — 2026-09-10
- 4.7.0 — 2026-07-28
- 4.7.0-dev.20260727091735 — 2026-07-27
- 4.7.0-dev.20260713101438 — 2026-07-13
- 4.7.0-dev-test-snapshot.20260707113553 — 2026-07-07
- 4.7.0-dev-test-snapshot.20260707113111 — 2026-07-07
- … 99 more at https://npm.io/package/@open-pioneer/runtime/versions

## README

# @open-pioneer/runtime

Implements the runtime environment for Open Pioneer Trails apps.
The package also provides services for app development.

## Quick start

Import the `createCustomElement` function from this package to create your application as a Web Component:

```js
// my-app/app.ts
import { createCustomElement } from "@open-pioneer/runtime";
import * as appMetadata from "open-pioneer:app";
import { AppUI } from "./AppUI";

const Element = createCustomElement({
    component: AppUI,
    appMetadata
});

customElements.define("my-app", Element);
```

In this example, `Element` is a custom web component class registered as `<my-app>`.
The application renders the `AppUI` (a React component) and automatically contains the services, styles etc. of its package dependencies.
HTML sites or JavaScript code can now instantiate the application by creating a DOM-Element:

```html
<!-- some-site/index.html -->
<!doctype html>
<html>
    <body>
        <!-- Contains the app once the script has been loaded -->
        <my-app></my-app>
        <script type="module" src="/apps/my-app/app.ts"></script>
    </body>
</html>
```

## Error screen

If a hard error occurs on application start, the `AppUI` cannot be rendered but an error screen is shown instead.
The error screen shows a message to the user that an error occurred on application start.
The error screen is available in English (fallback) and German.

If the application was started in development mode, the error screen shows additional information about the error and the stack trace.

## Provided services

The package contains services that provide different functionalities useful for app development.
For details, see the API description of the respective service.

### ApplicationContext

The ApplicationContext provides access to global application values, e.g. the web component's host element and the root node.

### LocaleService

The LocaleService provides the current locale and the supported message locales, and switches the locale at runtime.

### ThemeService

The ThemeService controls the color mode and the Chakra system config of the app.

### NumberParserService

The NumberParserService provides a method to parse a string to a number according to the current locale.

## License

Apache-2.0 (see `LICENSE` file)

---
_Source: https://npm.io/package/@open-pioneer/runtime · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
