Skip to main content

Packages

The @mapples/* packages are the runtime a Mapples app runs on. They are published on npm under the MIT licence and mirrored in the public mapples-open-kit repository. An app from mapples create depends on all of them at one version; each can also be used on its own.

Runtime packages​

PackageWhat it doesReference
@mapples/appMapplesApp: fonts, style, the component registry and the behaviour runtime in one wrapper; the Metro resolver for the files the CLI writesAPI
@mapples/uiThe primitives: View, ScrollView, Typography, Image, Icon, Pressable, TextInput, Button, lists, QR and bar codes, gradients, videoAPI
@mapples/componentsThe themed library: Card, ListItem, InputField, Chip, Tabs, Bottom sheet, Dialog, Snackbar, tab bar and drawer items and many moreAPI
@mapples/styleStyler: theme, typography, sizing and responsive tokens, Styler.create, styled, the Typography elementGuide · API
@mapples/formForm state, validation with Yup, field hooks and historyGuide · API
@mapples/renderRenders a JSON element tree against a component registry; the MapplesElement the Babel plugin targetsAPI
@mapples/stateData bindings, variables and the state namespaces (vars., api., route., tab.)API
@mapples/actionThe action bus that element events are emitted onAPI
@mapples/navigationThe navigation document, route guards and parameters, designed tab bars and drawersnpm
@mapples/requestRuns the project's API requests and publishes api.<name> statenpm
@mapples/inlangThe expression mini-language for bindings and conditions (path::op::value, joins, dimensions)API
@mapples/typesShared types: the element tree, the navigation, API, variables and packages documentsAPI
@mapples/fontsThe bundled open-licence font familiesnpm
@mapples/dndDrag and drop for React Native, used by the Creator canvasAPI

Tooling packages​

PackageWhat it does
mapplesThe CLI. See the CLI reference
babel-plugin-mapples-sidStrips the $sid tooling attributes from production bundles
@mapples/sid-ast, @mapples/codegen, @mapples/textpatch, @mapples/api-importNode-side libraries the CLI is built from: TSX to tree and back, code generation, text patches and API import

Versions and channels​

The runtime is released on three npm dist-tags: latest (stable), rc and beta. mapples create pins the channel the CLI came from, and npx mapples check shows what is newer, with an exact-pin install line. Mixing channels is not supported.

API reference​

The pages under API reference in the sidebar are generated from the source of the published stable packages with TypeDoc. They cover action, app, components, dnd, form, inlang, render, state, style, types and ui.