@pixerate/editor 0.80.0 → 0.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -3
- package/dist/agent/index.cjs +102 -6
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +4 -2
- package/dist/agent/index.d.ts +4 -2
- package/dist/agent/index.js +101 -5
- package/dist/agent/index.js.map +1 -1
- package/dist/{builtins-BKYlHH1s.d.ts → builtins-CV1fDj64.d.ts} +5 -1
- package/dist/{builtins-1kqwLUnb.d.cts → builtins-c4w0eAYl.d.cts} +5 -1
- package/dist/{chunk-2CJ3LPYQ.js → chunk-424H3P4I.js} +13 -295
- package/dist/chunk-424H3P4I.js.map +1 -0
- package/dist/{chunk-UN33YOXW.cjs → chunk-PA5S7KPC.cjs} +293 -2
- package/dist/chunk-PA5S7KPC.cjs.map +1 -0
- package/dist/{chunk-IB3ZHQAX.js → chunk-PTYWCFFW.js} +29 -4
- package/dist/chunk-PTYWCFFW.js.map +1 -0
- package/dist/{chunk-JQ3BB3E6.js → chunk-PXDEFEG2.js} +293 -2
- package/dist/chunk-PXDEFEG2.js.map +1 -0
- package/dist/{chunk-YU4WQE5M.cjs → chunk-TAPXWP2B.cjs} +95 -377
- package/dist/chunk-TAPXWP2B.cjs.map +1 -0
- package/dist/{chunk-HXDMZQTD.cjs → chunk-TPOT575P.cjs} +29 -4
- package/dist/{chunk-IB3ZHQAX.js.map → chunk-TPOT575P.cjs.map} +1 -1
- package/dist/commands/index.cjs +2 -2
- package/dist/commands/index.d.cts +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/generation/index.cjs +932 -791
- package/dist/generation/index.cjs.map +1 -1
- package/dist/generation/index.d.cts +266 -240
- package/dist/generation/index.d.ts +266 -240
- package/dist/generation/index.js +926 -785
- package/dist/generation/index.js.map +1 -1
- package/dist/image-editor/index.cjs +266 -2
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +12 -1
- package/dist/image-editor/index.d.ts +12 -1
- package/dist/image-editor/index.js +265 -1
- package/dist/image-editor/index.js.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -16
- package/dist/spreadsheet/index.cjs +3 -3
- package/dist/spreadsheet/index.cjs.map +1 -1
- package/dist/spreadsheet/index.js +16 -16
- package/package.json +2 -1
- package/skills/README.md +55 -0
- package/skills/pixerate-agent-tools/SKILL.md +75 -0
- package/skills/pixerate-animation-editor/SKILL.md +155 -0
- package/skills/pixerate-animation-editor/references/commands.md +123 -0
- package/skills/pixerate-canvas/SKILL.md +230 -0
- package/skills/pixerate-chart/SKILL.md +190 -0
- package/skills/pixerate-diagram/SKILL.md +134 -0
- package/skills/pixerate-generation/SKILL.md +109 -0
- package/skills/pixerate-image-editor/SKILL.md +139 -0
- package/skills/pixerate-parameters/SKILL.md +83 -0
- package/skills/pixerate-rich-text/SKILL.md +160 -0
- package/skills/pixerate-spreadsheet/SKILL.md +146 -0
- package/skills/pixerate-vector/SKILL.md +191 -0
- package/skills/pixerate-vector/references/commands.md +138 -0
- package/skills/pixerate-video-editor/SKILL.md +173 -0
- package/dist/chunk-2CJ3LPYQ.js.map +0 -1
- package/dist/chunk-HXDMZQTD.cjs.map +0 -1
- package/dist/chunk-JQ3BB3E6.js.map +0 -1
- package/dist/chunk-UN33YOXW.cjs.map +0 -1
- package/dist/chunk-YU4WQE5M.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -211,7 +211,7 @@ Built-in providers:
|
|
|
211
211
|
| Provider | Tools |
|
|
212
212
|
| :--- | :--- |
|
|
213
213
|
| `createRichTextToolProvider(editor, { id })` | `get_text` (`format`, `blocks: true` for every paragraph's positions), `find_text`, `insert_text`, `replace_text` (all matches or the n-th, one undo step), `replace_range`, `replace_selection`, `set_selection`, `edit_table` (when tables are on). Read-only editors get `get_text` and `find_text`. |
|
|
214
|
-
| `createSpreadsheetToolProvider(controller, { id })` | `get_range`, `set_cell`, `set_range` (2D block, one undo step, refuses read-only targets), `insert_rows`, `delete_rows`, `insert_columns`, `delete_columns` |
|
|
214
|
+
| `createSpreadsheetToolProvider(controller, { id })` | `get_range`, `set_cell`, `set_range` (2D block, one undo step, refuses read-only targets), `insert_rows`, `delete_rows`, `insert_columns`, `delete_columns`, `merge_cells`, `unmerge_cells`, `transpose_range` (on an A1 range, not the user's selection) |
|
|
215
215
|
| `createEditorMcpToolProvider({ id, getSnapshot, applySteps })` | `get_editor_state`, `canvas_add_node`, `canvas_remove_nodes`, `canvas_connect`, `canvas_update_node`, `canvas_layout`, `canvas_select`, `canvas_highlight`, `prompt_insert_text`, `prompt_replace_range`, `prompt_set_variable`, `prompt_select`, `view_editor` (with `captureView`) |
|
|
216
216
|
| `createCanvasComponentToolProvider`, `createCommandToolProvider`, `createImageEditorToolProvider`, `createGenerationToolProvider` | See the canvas, commands, image editor and generation docs |
|
|
217
217
|
|
|
@@ -250,6 +250,16 @@ const result = await registry.callTool(name, args); // MCP tools/call result
|
|
|
250
250
|
|
|
251
251
|
It exports `ToolRegistry`, `createToolRegistry`, `ToolRegistryError`, the tool types (`AgentTool`, `AgentToolProvider`, `AgentToolHandler`, `ToolCallContext`, `McpToolDefinition`, `McpToolResult`, `McpListToolsResult`, `ToolCallError`), `validateJsonSchema` / `SchemaValidationError`, the static tool definitions (`EDITOR_MCP_TOOLS`, `EDITOR_CANVAS_TOOLS`, `EDITOR_PROMPT_TOOLS`) and `createMcpServer`. `/agent` re-exports all of it, so existing imports keep working. `createEditorMcpToolProvider` stays in `/agent` because its `layout` operation runs dagre.
|
|
252
252
|
|
|
253
|
+
### Agent skills
|
|
254
|
+
|
|
255
|
+
The package ships an [Agent Skill](https://agentskills.io) per editor domain in `skills/` (`pixerate-chart`, `pixerate-video-editor`, ...) plus `pixerate-agent-tools` for what they share. Each tells a model when and how to use every tool and command of its domain and the practice an expert would follow. Copy them into your agent's skills folder:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
cp -R node_modules/@pixerate/editor/skills/* .claude/skills/
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
See [`skills/README.md`](./skills/README.md) for the list.
|
|
262
|
+
|
|
253
263
|
## Commands, shortcuts and the command palette
|
|
254
264
|
|
|
255
265
|
`@pixerate/editor/commands` gives every action one id that menus, keyboard shortcuts, the command palette and agents all run, so they share enablement and parameter validation. It has no third-party imports.
|
|
@@ -323,7 +333,7 @@ const plan = planGenerationRequest({ aspectRatio: "21:9", count: 3 }, model, { s
|
|
|
323
333
|
```
|
|
324
334
|
|
|
325
335
|
- **Strategies**: `nearest` (default) snaps enum values to the closest option, clamps and rounds ranges, truncates text and reference lists, and drops unsupported fields and references, reporting each change. Ties go to the higher value, or to the lower one with `downgrade`. `upgrade` also breaks ties upwards but does not drop references the model cannot use: that is an error, as is a text-only model given image references. `error` changes nothing and reports every mismatch. Missing required references, unsupported modes (`edit` / `inpaint`) and a model mismatch are always errors. Planning is pure and deterministic.
|
|
326
|
-
- **Schema and agents**: `capabilitiesToJsonSchema(model)` builds a strict request schema (enums, `minimum` / `maximum`, `maxItems`, and descriptions for per-role limits) that `validateJsonSchema` checks. `createGenerationToolProvider({ models, generate, estimate? })` adds `list_models`, `plan_generation` and `estimate_generation` (read-only) and `generate` (destructive) to a `ToolRegistry`. `generate` requires an `idempotencyKey`: a retry with the same key and arguments returns the first result (or joins it while it is still running) instead of generating again. `mergeCapabilities(remote, overlay)` keeps server capability values and takes only presentation fields (`name`, `description`, `badges`, `icon`, `group`) and overlay-only models from the overlay.
|
|
336
|
+
- **Schema and agents**: `capabilitiesToJsonSchema(model)` builds a strict request schema (enums, `minimum` / `maximum`, `maxItems`, and descriptions for per-role limits) that `validateJsonSchema` checks. `createGenerationToolProvider({ models, generate, estimate? })` adds `list_models`, `plan_generation` and `estimate_generation` (read-only) and `generate` (destructive) to a `ToolRegistry`. `generate` requires an `idempotencyKey`: a retry with the same key and arguments returns the first result (or joins it while it is still running) instead of generating again. `createGenerationHistoryToolProvider({ store, models?, templates?, assets? })` lets an agent use the generation history: `list_generations`, `get_generation`, and `recreate_generation` / `vary_generation`, which return a request (with drift) to pass to `generate` rather than spending themselves. `mergeCapabilities(remote, overlay)` keeps server capability values and takes only presentation fields (`name`, `description`, `badges`, `icon`, `group`) and overlay-only models from the overlay.
|
|
327
337
|
- **Provenance**: `createProvenance({ rawPrompt, templates, bindings, values, model, plan })` pins the exact bodies and versions of every template the prompt reached, and records the variable values, the resolved prompt with its source map, the planned settings, adjustments and references. `serializeProvenance` / `parseProvenance` are versioned. `recreateRequest(provenance)` returns the request that was sent, and `replayProvenancePrompt` re-resolves the prompt from the pinned bodies.
|
|
328
338
|
- **Lookups and progress**: `createBatchResolver({ fetch, maxBatch, delayMs })` batches and dedupes lookups; a failed batch resolves its keys as empty instead of retrying. `estimateJobProgress({ startedAt, now, expectedMs })` returns a time-based percent that stays at or below 95 until `done`, and a label such as `~2m left` or `Almost done…`. `expectedDurationFor(model, request)` uses the model's `timing`.
|
|
329
339
|
- **Forms**: `getGenerationControls(model)` and `getReferenceSlots(model, request)` describe the controls that the React and Svelte `<GenerationSettings>` render.
|
|
@@ -372,7 +382,7 @@ editor.setAdjustmentLayerMaskProps(id, { density: 0.6 });
|
|
|
372
382
|
- **Layer masks**: `AdjustmentLayer.mask` (`{ width, height, rle, density?, feather?, enabled? }`) scales the layer's opacity per pixel; it is resampled through the crop / rotation / flips like the image. `selectionFromLayerMask` loads it back.
|
|
373
383
|
- **Document**: `toJSON()` adds `selection` (run-length encoded, `r1:` + base64) only when something is selected, and layers only carry `mask` when they have one, so selection- and mask-free documents serialize exactly as before. Selections are part of undo history. `renderMask()` / `toMaskDataURL()` include the selection for inpainting.
|
|
374
384
|
- **Viewport**: marching ants by default, `quickMask` tints the unselected area; `RenderOptions.selectionDisplay` overrides, `draftSelectionPath` shows a shape being drawn. `SelectionGesture` turns pointer events into selections for UIs.
|
|
375
|
-
- **Agent tools**: `createImageEditorToolProvider` adds `get_selection`, `select_region`, `select_by_color`, `modify_selection`, `refine_selection` and `apply_selection_as_mask`.
|
|
385
|
+
- **Agent tools**: `createImageEditorToolProvider` adds `get_selection`, `select_region`, `select_by_color`, `modify_selection`, `refine_selection` and `apply_selection_as_mask`, plus `get_image_info`, `get_histogram`, `update_adjustment_layer`, `move_adjustment_layer`, `remove_adjustment_layer`, `set_crop`, `reset_crop`, `set_rotation`, `flip_image`, `undo_image` and `redo_image`.
|
|
376
386
|
- **Pixels**: the tools read the source image through a canvas; pass `setSamplePixels(imageData)` (or `{ pixels }` per call) where there is no canvas or the image is cross-origin.
|
|
377
387
|
|
|
378
388
|
## Spreadsheet sheets, defined names and LAMBDA
|
package/dist/agent/index.cjs
CHANGED
|
@@ -45,7 +45,7 @@ var _chunkK73CKYUMcjs = require('../chunk-K73CKYUM.cjs');
|
|
|
45
45
|
var _chunkQIWFEEWGcjs = require('../chunk-QIWFEEWG.cjs');
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var _chunkTPOT575Pcjs = require('../chunk-TPOT575P.cjs');
|
|
49
49
|
require('../chunk-26BVFKHU.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
@@ -85,7 +85,12 @@ var _chunkCKRNELPOcjs = require('../chunk-CKRNELPO.cjs');
|
|
|
85
85
|
var _chunkTYOAJDFDcjs = require('../chunk-TYOAJDFD.cjs');
|
|
86
86
|
require('../chunk-IFHKKVXH.cjs');
|
|
87
87
|
require('../chunk-BVP3TSLH.cjs');
|
|
88
|
-
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
var _chunkPA5S7KPCcjs = require('../chunk-PA5S7KPC.cjs');
|
|
89
94
|
|
|
90
95
|
|
|
91
96
|
|
|
@@ -1044,6 +1049,14 @@ function parseColumn(name) {
|
|
|
1044
1049
|
if (!COLUMN_REGEX.test(name.trim())) throw new Error(`Invalid column "${name}". Use a letter name, e.g. "C".`);
|
|
1045
1050
|
return _chunkXP5IUZUOcjs.colNameToIndex.call(void 0, name.trim().toUpperCase());
|
|
1046
1051
|
}
|
|
1052
|
+
function parseRange(ref) {
|
|
1053
|
+
const [startRef, endRef = startRef, extra] = String(ref).split(":");
|
|
1054
|
+
if (extra !== void 0) throw new Error(`Invalid range "${ref}". Use A1 notation, e.g. "A1:C5".`);
|
|
1055
|
+
const start = parseCell(startRef);
|
|
1056
|
+
const end = parseCell(endRef);
|
|
1057
|
+
return _chunkPA5S7KPCcjs.normalizeRange.call(void 0, { startRow: start.row, startCol: start.col, endRow: end.row, endCol: end.col });
|
|
1058
|
+
}
|
|
1059
|
+
var formatRange = (r) => `${_chunkXP5IUZUOcjs.indexToColName.call(void 0, r.startCol)}${r.startRow + 1}:${_chunkXP5IUZUOcjs.indexToColName.call(void 0, r.endCol)}${r.endRow + 1}`;
|
|
1047
1060
|
var CELL_INPUT = { type: ["string", "number", "boolean", "null"] };
|
|
1048
1061
|
function createSpreadsheetToolProvider(controller, options) {
|
|
1049
1062
|
const lookup = (row, col) => {
|
|
@@ -1054,7 +1067,7 @@ function createSpreadsheetToolProvider(controller, options) {
|
|
|
1054
1067
|
const getRange = {
|
|
1055
1068
|
name: "get_range",
|
|
1056
1069
|
title: "Read cells",
|
|
1057
|
-
description: 'Reads a cell range in A1 notation (e.g. "A1:C5" or "B2") and returns computed values, raw input and
|
|
1070
|
+
description: 'Reads a cell range in A1 notation (e.g. "A1:C5" or "B2") and returns computed values, raw input, errors and the merged ranges that touch it (a merged range shows its value in its top-left cell).',
|
|
1058
1071
|
inputSchema: {
|
|
1059
1072
|
type: "object",
|
|
1060
1073
|
properties: {
|
|
@@ -1097,11 +1110,13 @@ function createSpreadsheetToolProvider(controller, options) {
|
|
|
1097
1110
|
values.push(valueRow);
|
|
1098
1111
|
raw.push(rawRow);
|
|
1099
1112
|
}
|
|
1113
|
+
const read = { startRow: r0, startCol: c0, endRow: r1, endCol: c1 };
|
|
1100
1114
|
return {
|
|
1101
|
-
range: values.length && values[0].length ?
|
|
1115
|
+
range: values.length && values[0].length ? formatRange(read) : null,
|
|
1102
1116
|
values,
|
|
1103
1117
|
raw,
|
|
1104
1118
|
errors,
|
|
1119
|
+
merges: controller.getMerges().filter((m) => _chunkPA5S7KPCcjs.rangesIntersect.call(void 0, m, read)).map(formatRange),
|
|
1105
1120
|
sheet: { rows: rowCount, columns: colCount }
|
|
1106
1121
|
};
|
|
1107
1122
|
}
|
|
@@ -1272,10 +1287,91 @@ function createSpreadsheetToolProvider(controller, options) {
|
|
|
1272
1287
|
return { deleted: count, sheet: sheetSize() };
|
|
1273
1288
|
}
|
|
1274
1289
|
);
|
|
1290
|
+
const RANGE = { type: "string", description: 'A1-notation range of at least two cells, e.g. "A1:C1".' };
|
|
1291
|
+
const inSheet = (r, ref) => {
|
|
1292
|
+
if (r.endRow >= controller.document.rows.length || r.endCol >= controller.document.columns.length) {
|
|
1293
|
+
throw new Error(`Range ${ref} is outside the sheet (${controller.document.rows.length} rows, ${controller.document.columns.length} columns).`);
|
|
1294
|
+
}
|
|
1295
|
+
};
|
|
1296
|
+
const readOnlyIn = (r) => {
|
|
1297
|
+
const cells = [];
|
|
1298
|
+
for (let row = r.startRow; row <= r.endRow; row++) {
|
|
1299
|
+
for (let col = r.startCol; col <= r.endCol; col++) if (isReadOnly(row, col)) cells.push(`${_chunkXP5IUZUOcjs.indexToColName.call(void 0, col)}${row + 1}`);
|
|
1300
|
+
}
|
|
1301
|
+
return cells;
|
|
1302
|
+
};
|
|
1303
|
+
const SPILL = "it overlaps the spill range of a dynamic array formula; move or clear that formula first";
|
|
1304
|
+
const mergeCells = structural(
|
|
1305
|
+
"merge_cells",
|
|
1306
|
+
"Merge cells",
|
|
1307
|
+
"Merges a range into one cell showing the top-left cell's value. The other cells in the range are cleared, so move their contents first. Merges fully inside the range are absorbed. One undo step. Returns the merged range and the cells that were cleared. Use merges only for titles outside data regions: they break sorting, filtering and transposing.",
|
|
1308
|
+
{ range: RANGE },
|
|
1309
|
+
["range"],
|
|
1310
|
+
true,
|
|
1311
|
+
({ range }) => {
|
|
1312
|
+
const r = parseRange(range);
|
|
1313
|
+
inSheet(r, range);
|
|
1314
|
+
if (_chunkPA5S7KPCcjs.isSingleCellRange.call(void 0, r)) throw new Error(`${range} is a single cell; give a range of at least two cells.`);
|
|
1315
|
+
const partial = controller.getMerges().find((m) => _chunkPA5S7KPCcjs.rangesIntersect.call(void 0, m, r) && !_chunkPA5S7KPCcjs.rangeContainsRange.call(void 0, r, m));
|
|
1316
|
+
if (partial) throw new Error(`${range} partly overlaps the merged range ${formatRange(partial)}; include all of it or unmerge it first.`);
|
|
1317
|
+
const readOnly = readOnlyIn(r);
|
|
1318
|
+
if (readOnly.length) throw new Error(`Read-only cells: ${readOnly.slice(0, 20).join(", ")}. Nothing was merged.`);
|
|
1319
|
+
const cleared = [];
|
|
1320
|
+
for (let row = r.startRow; row <= r.endRow; row++) {
|
|
1321
|
+
for (let col = r.startCol; col <= r.endCol; col++) {
|
|
1322
|
+
if (row === r.startRow && col === r.startCol) continue;
|
|
1323
|
+
const { rowDef, colDef } = lookup(row, col);
|
|
1324
|
+
if (controller.getCell(rowDef.id, colDef.id).raw !== "") cleared.push(`${_chunkXP5IUZUOcjs.indexToColName.call(void 0, col)}${row + 1}`);
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
if (!controller.mergeCells(r)) throw new Error(`Cannot merge ${range}: ${SPILL}.`);
|
|
1328
|
+
return { merged: formatRange(r), cleared };
|
|
1329
|
+
}
|
|
1330
|
+
);
|
|
1331
|
+
const unmergeCells = structural(
|
|
1332
|
+
"unmerge_cells",
|
|
1333
|
+
"Unmerge cells",
|
|
1334
|
+
"Splits every merged range that touches a range back into separate cells (the value stays in the top-left cell; the others are empty). One undo step. Returns the ranges that were unmerged.",
|
|
1335
|
+
{ range: { type: "string", description: 'A1-notation cell or range; every merge touching it is split, e.g. "A1".' } },
|
|
1336
|
+
["range"],
|
|
1337
|
+
false,
|
|
1338
|
+
({ range }) => {
|
|
1339
|
+
const r = parseRange(range);
|
|
1340
|
+
const touched = controller.getMerges().filter((m) => _chunkPA5S7KPCcjs.rangesIntersect.call(void 0, m, r));
|
|
1341
|
+
if (!touched.length) throw new Error(`No merged cells in ${range}. get_range lists the merges in a range.`);
|
|
1342
|
+
controller.unmergeCells(r);
|
|
1343
|
+
return { unmerged: touched.map(formatRange) };
|
|
1344
|
+
}
|
|
1345
|
+
);
|
|
1346
|
+
const transposeRange = structural(
|
|
1347
|
+
"transpose_range",
|
|
1348
|
+
"Transpose a range",
|
|
1349
|
+
"Swaps the rows and columns of a range in place, anchored on its top-left cell (A1:C2 becomes A1:B3), moving values, formulas, formats and rules; formulas that point into the range follow their cells. The sheet grows to fit. One undo step. Returns the new range. Cells the result covers outside the original range are overwritten.",
|
|
1350
|
+
{ range: RANGE },
|
|
1351
|
+
["range"],
|
|
1352
|
+
true,
|
|
1353
|
+
({ range }) => {
|
|
1354
|
+
const s = parseRange(range);
|
|
1355
|
+
inSheet(s, range);
|
|
1356
|
+
if (_chunkPA5S7KPCcjs.isSingleCellRange.call(void 0, s)) throw new Error(`${range} is a single cell; give a range of at least two cells.`);
|
|
1357
|
+
const t = {
|
|
1358
|
+
startRow: s.startRow,
|
|
1359
|
+
startCol: s.startCol,
|
|
1360
|
+
endRow: s.startRow + (s.endCol - s.startCol),
|
|
1361
|
+
endCol: s.startCol + (s.endRow - s.startRow)
|
|
1362
|
+
};
|
|
1363
|
+
const merge = controller.getMerges().find((m) => _chunkPA5S7KPCcjs.rangesIntersect.call(void 0, m, s) || _chunkPA5S7KPCcjs.rangesIntersect.call(void 0, m, t));
|
|
1364
|
+
if (merge) throw new Error(`Cannot transpose ${range}: the merged range ${formatRange(merge)} is in the way; unmerge it first.`);
|
|
1365
|
+
const readOnly = [.../* @__PURE__ */ new Set([...readOnlyIn(s), ...readOnlyIn(t)])];
|
|
1366
|
+
if (readOnly.length) throw new Error(`Read-only cells: ${readOnly.slice(0, 20).join(", ")}. Nothing was transposed.`);
|
|
1367
|
+
if (!controller.transposeRange(s)) throw new Error(`Cannot transpose ${range}: ${SPILL}.`);
|
|
1368
|
+
return { range: formatRange(t), sheet: sheetSize() };
|
|
1369
|
+
}
|
|
1370
|
+
);
|
|
1275
1371
|
return {
|
|
1276
1372
|
id: options.id,
|
|
1277
1373
|
namespace: options.namespace,
|
|
1278
|
-
tools: [getRange, setCell, setRange, insertRows, deleteRows, insertColumns, deleteColumns]
|
|
1374
|
+
tools: [getRange, setCell, setRange, insertRows, deleteRows, insertColumns, deleteColumns, mergeCells, unmergeCells, transposeRange]
|
|
1279
1375
|
};
|
|
1280
1376
|
}
|
|
1281
1377
|
function missingArgumentsMessage(name, args) {
|
|
@@ -1481,7 +1577,7 @@ function createCanvasComponentToolProvider(controller, options = { id: "canvas-c
|
|
|
1481
1577
|
({ id }) => check(controller.restoreMainComponent(id))
|
|
1482
1578
|
)
|
|
1483
1579
|
];
|
|
1484
|
-
if (
|
|
1580
|
+
if (_chunkTPOT575Pcjs.hasVariantCommands.call(void 0, controller)) {
|
|
1485
1581
|
const SET = { type: "string", description: "Component set, or one of its variants (default: the selection\u2019s set)." };
|
|
1486
1582
|
const VARIANT = { type: "string", description: "Variant id (default: the first selected variant)." };
|
|
1487
1583
|
const VALUES = { type: "object", additionalProperties: { type: "string" }, description: 'Variant property \u2192 value, e.g. { "Size": "Medium" }.' };
|