Open-Source Wikis

/

tldraw

/

Packages

/

@tldraw/assets

tldraw/tldraw

@tldraw/assets

Purpose

@tldraw/assets is the asset bundle: icons, fonts, translations, and embed icon sets. Module exports under packages/assets/src/ are generated from source assets in the repo-root assets/ directory by internal/scripts/refresh-assets.ts.

Layout

packages/assets/
├── package.json
└── src/                       # generated; do not hand-edit
    ├── icons/
    ├── fonts/
    ├── embedIcons/
    ├── translations/
    └── ...

How it works

  1. Source files live in the repo's top-level assets/ directory (icons SVGs, font files, translation JSON).
  2. yarn refresh-assets (run automatically from postinstall and from yarn typecheck) regenerates the modules under packages/assets/src/.
  3. Other packages import the generated modules. The editor's assetUrls.ts resolves URLs against a configurable base path so the bundled assets work offline and across deployment domains.

Integration points

  • Imports. Generated.
  • Importers. @tldraw/editor, @tldraw/tldraw.

Modifying

  • To add an icon: drop the SVG into the appropriate sub-folder of assets/icons/, then run yarn refresh-assets.
  • To add a translation key: edit the source language JSON, push via yarn i18n-upload-strings, and download translations with yarn i18n-download-strings.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

@tldraw/assets – tldraw wiki | Factory