@silexlabs/grapesjs-symbols
Version:
Symbols for GrapesJS
53 lines • 1.63 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.registerCapabilities = registerCapabilities;
var SymbolsCommands_1 = require("./SymbolsCommands");
function registerCapabilities(addCapability) {
addCapability({
id: SymbolsCommands_1.cmdList,
command: SymbolsCommands_1.cmdList,
description: 'List all symbols',
readOnly: true,
tags: ['symbols'],
});
addCapability({
id: SymbolsCommands_1.cmdAdd,
command: SymbolsCommands_1.cmdAdd,
description: 'Create symbol from element',
inputSchema: {
type: 'object',
properties: {
label: { type: 'string' },
icon: { type: 'string' },
},
},
tags: ['symbols'],
});
addCapability({
id: SymbolsCommands_1.cmdRemove,
command: SymbolsCommands_1.cmdRemove,
description: 'Delete a symbol',
destructive: true,
inputSchema: {
type: 'object',
required: ['symbolId'],
properties: {
symbolId: { type: 'string' },
},
},
tags: ['symbols'],
});
addCapability({
id: SymbolsCommands_1.cmdUnlink,
command: SymbolsCommands_1.cmdUnlink,
description: 'Unlink element from symbol',
tags: ['symbols'],
});
addCapability({
id: SymbolsCommands_1.cmdCreate,
command: SymbolsCommands_1.cmdCreate,
description: 'Create symbol instance',
tags: ['symbols'],
});
}
//# sourceMappingURL=capabilities.js.map