@mocanvas/mocanvas · constant
declare const defaultShapeTools: StateNodeConstructor[]The tools that *place a shape*: one entry per built-in shape type that has a tool of its own.
Split out from defaultTools so an app can register the canvas tools and its own shape tools without inheriting ours:
``ts
tools: [...defaultTools, ...defaultShapeTools, SectionTool]
``
defaultTools still contains these as well, so that spread names each
tool twice. That is deliberate and safe — a tool is registered under its
id, so a repeated constructor replaces its own earlier entry rather than
adding a second one — and it keeps every existing tools: defaultTools
working unchanged.
Mentioned here
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.