mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-26 19:36:46 -06:00
Plugins can hand the host a file name, MIME type and bytes through the new `save_file` import (plugin API 4, `permissions.saveFile`). The host asks the user where to save (browser download on the web), so the plugin never sees a path. Includes the SDK wrapper and the `export-names` example plugin. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Assisted-by: Claude (Anthropic)
23 lines
542 B
JSON
23 lines
542 B
JSON
{
|
|
"id": "org.figcraft.examples.export-names",
|
|
"name": "Export names",
|
|
"version": "1.0.0",
|
|
"description": "Saves the names of the selected layers as a text file, one per line.",
|
|
"main": "export_names.wasm",
|
|
"api": 4,
|
|
"permissions": {
|
|
"access": "read",
|
|
"commands": ["node.get"],
|
|
"saveFile": true
|
|
},
|
|
"commands": [
|
|
{
|
|
"id": "export",
|
|
"label": "Export names…",
|
|
"params": [
|
|
{ "name": "children", "label": "Include layers inside", "type": "boolean", "default": true }
|
|
]
|
|
}
|
|
]
|
|
}
|