Upgrading from 0.1.0 to 0.2.0

Migrate DocStudio from 0.1.0 to 0.2.0: new designer actions and helpers, the removed designer exports with their replacements, and behavior changes.

0.2.0 adds built-in designer actions and one-call helpers, and removes designer exports that were internal. Read this page if you import from docstudio/designer. If you only use docstudio/core and docstudio/render, nothing you rely on was removed.

New

  • onSubmit, onView, onPrint and actions props of Designer. See designer setup.
  • renderDocument in docstudio, and printHtml in docstudio/pdf.
  • The themes prop of Designer, which fills a Theme drop-down.
  • Library: Insert follows the chosen Header, Body or Footer target.
  • The designer may import the browser-safe pdf module, and renderDocument is exported from the root entry.

Removed

Removed names What to do
planCommand, Plan, PlanContext Call editor.execute(command)
resolveDrop, insertionIndex, moveCommandIndex, Box, DropTarget, Dragged, Geometry, GeoItem, Point No replacement. Drop resolution is internal. Use the insert and move commands
moveFrame, nudgeFrame, resizeFrame, rotateFrame, snapMove, snapTargetsFor, FrameValue, Guide, Handle, SnapResult, SnapTargets No replacement. Frame math is internal. Set frame with a set command
nodeFields, styleFields, parseFieldValue, FieldKind, FieldSpec, ParsedValue Read TEMPLATE_SCHEMA from docstudio/core
exprAt, kindOf, setLiteral, isExpr, ExprAt, ExprKind, ExprStep Use setPath, setFunction, addArg, replaceAt, wrapInCall and isValidExpression
FUNCTION_GROUPS, FunctionGroup, OF_FUNCTIONS, arityOf, functionsIn Use FUNCTION_DESCRIPTORS
filterChoices, unknownPathIn, SchemaScope, ScopeSite Use pathChoices(scope) and scopeFor
summarize Use previewExpression
MappedColumn, allColumns, columnAtPosition, visibleColumns No replacement. Table column mapping is internal
uniqueAlias, importsOf Use addImport and referencesOf
containerPointer, isDescendantOrSelf, mapRdtId, DEFAULT_FRAME No replacement. Internal document model helpers
onOpenVersion prop Read versions with ComponentLibrary.get(name, version)
view, closeView, readOnlyJson, usedBy, noDependents, direct, through in messages.library Remove them from your overrides

Behavior changes

  • The page number tool is labeled Pg number.
  • The canvas frame has an accessible name through aria-label. It no longer has a title, so no tooltip shows over the page.
  • A component name may contain letters, digits, underscore and hyphen. A dot is refused, and the message names the allowed characters.
  • The designer shows themed tooltips instead of the browser's own.

Migration example

To add a save button, pass a handler. The designer shows View, Print and Submit for you:

<Designer onSubmit={({ template, data }) => save(template, data)} />

Code that used planCommand to preview a command should execute it instead:

editor.execute(command);

Template schema

The template schema stays at 1.0.0. Templates written for 0.1.0 open unchanged.

Last updated 2026-12-03