An importer whose manifest sets `api` 4 and lists `outputKinds` (any of
type, image, layer and artboard) may return point type (text, font
family and style, size, fill, transform), embedded RGBA images stored
as PNG, top-level layers with their names, visibility, lock and
objects, and named artboards that replace the one around the art.
Output of a kind the manifest doesn't list is refused naming the kind.
The host checks the whole output before it makes the document: limits
on layers (256), artboards (100), names (256 characters, no control or
text direction characters), text (1 MiB a type object, 16 MiB in all)
and pixels (16,384 a side, 32 MiB of RGBA in all, checked from the
sizes given before any base64 is decoded), and an image whose bytes
aren't 4 x width x height. One bad entry opens nothing and leaves the
open document as it was. Importers below level 4 read paths alone, as
before. The host's plug-in API level goes to 4.
Docs: docs/plugins.md, docs/gaps.md, docs/target-app-parity.md.
An importer plug-in with "place": true in its manifest now reads its files
for File › Place as well as File › Open. file.place, file.place.info and
file.place.queue take importer and params; without importer, a file no
built-in format reads goes to the first placing importer by id that lists
its extension. The importer is given at most 128 MiB of the file (a larger
file is refused from its size before it is read) with _context.mode
"place", and its objects, guides left out, become one group named after
the file, as one undo step, embedded. A decline, invalid output, a trap or
Cancel places nothing.
- The Place dialog lists placing importers' extensions under "All
placeable files" and in a filter named after each importer.
- On the web, a placing importer's file dropped on the canvas is placed.
- A file placed with a named importer skips the text, PDF, DXF and PSD
import options.
- document.formats and plugin.list mark placing importers with place:
true; place on any other kind is refused at install.
Docs: docs/plugins.md, docs/mcp.md, docs/gaps.md, docs/target-app-parity.md.
An import's instruction and time budgets are now host limits on Limits, as a heavy filter's are, so a test can give an importer a small budget. An importer past its instruction or time limit, and a file past the input limit, return their error and leave an open document and its undo history unchanged. The manifest fuzz varies extensions (missing, dotted, mixed-case, repeated, too long and too many).
A plug-in of the wrong kind now gets "is a plug-in of kind `exporter`, not an importer", with rows in every complete-message catalog. The importer failure test also covers an open, edited document. docs/plugins.md states that Open Recent does not remember Open With's importer or parameters.
An importer plug-in (kind "importer", permission import.read) lists 1 to 8
file extensions and turns a file's bytes into objects, which open as a new
document whose artboard is their bounds. File › Open lists its extensions,
File › Open With (file.openWith) opens a file with a chosen importer, and
document.open takes importer and params. A built-in format that reads the
file by its content or extension always opens it; among importers listing
the same extension, the one whose id sorts first opens it. An importer reads
at most 128 MiB, and Place still reads only the built-in formats.
Docs: docs/plugins.md, docs/mcp.md, docs/gaps.md, docs/target-app-parity.md.