Skip to main content
Library components turn stable business rules into an instance-wide namespace. The runtime resolves a public library export as:
Category and Name identify the library component, ElementKey is the library element key, and X is the exported function, class, constant, or other public symbol. These identifiers are case-sensitive. Do not shorten the path to a component name alone: that changes the resolved object.

Author a library

Export the symbols from the element source. The platform places them below the complete library path; the source itself does not need to manufacture namespace objects.
The exact authoring shape shown by the editor is authoritative for your instance and active library version.

Consume a library

Use the exact path shown by Monaco for the active library. Public code uses the complete canonical lib.Category.Name.ElementKey.X form.

Versioning behavior

An execution resolves one effective library manifest. Updating or activating a library invalidates the relevant runtime and editor artifacts. A running execution continues with the version it resolved at start; a later execution receives the newly active version.

Design guidance

  • Keep libraries focused on reusable domain behavior.
  • Treat category, library name, and element key as public API segments; rename them as a compatibility change.
  • Document public and non-obvious functions with concise JSDoc.
  • Prefer platform util.* helpers for generic encoding, hashing, IDs, or sleep.
  • Test the library directly, then test one consuming component to confirm the generated type and runtime export agree.
Last modified on September 5, 2026