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
| Package | What it does | Reference |
|---|---|---|
@mapples/app | MapplesApp: fonts, style, the component registry and the behaviour runtime in one wrapper; the Metro resolver for the files the CLI writes | API |
@mapples/ui | The primitives: View, ScrollView, Typography, Image, Icon, Pressable, TextInput, Button, lists, QR and bar codes, gradients, video | API |
@mapples/components | The themed library: Card, ListItem, InputField, Chip, Tabs, Bottom sheet, Dialog, Snackbar, tab bar and drawer items and many more | API |
@mapples/style | Styler: theme, typography, sizing and responsive tokens, Styler.create, styled, the Typography element | Guide · API |
@mapples/form | Form state, validation with Yup, field hooks and history | Guide · API |
@mapples/render | Renders a JSON element tree against a component registry; the MapplesElement the Babel plugin targets | API |
@mapples/state | Data bindings, variables and the state namespaces (vars., api., route., tab.) | API |
@mapples/action | The action bus that element events are emitted on | API |
@mapples/navigation | The navigation document, route guards and parameters, designed tab bars and drawers | npm |
@mapples/request | Runs the project's API requests and publishes api.<name> state | npm |
@mapples/inlang | The expression mini-language for bindings and conditions (path::op::value, joins, dimensions) | API |
@mapples/types | Shared types: the element tree, the navigation, API, variables and packages documents | API |
@mapples/fonts | The bundled open-licence font families | npm |
@mapples/dnd | Drag and drop for React Native, used by the Creator canvas | API |
Tooling packages
| Package | What it does |
|---|---|
mapples | The CLI. See the CLI reference |
babel-plugin-mapples-sid | Strips the $sid tooling attributes from production bundles |
@mapples/sid-ast, @mapples/codegen, @mapples/textpatch, @mapples/api-import | Node-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.