@pixerate/editor 0.149.0 → 0.150.1
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/dist/agent/index.cjs +7 -5
- package/dist/agent/index.js +5 -3
- package/dist/animation/index.cjs +4 -2
- package/dist/animation/index.js +3 -1
- package/dist/chart/index.cjs +7 -7
- package/dist/chart/index.js +1 -1
- package/dist/{chunk-3EVMUYF4.js → chunk-6DXDUVSL.js} +1 -1
- package/dist/{chunk-ZCFHPORF.cjs → chunk-ERAGQL2N.cjs} +2 -2
- package/dist/{chunk-FR7GHH2K.cjs → chunk-GMWNBSBS.cjs} +3 -3
- package/dist/{chunk-OOV64UEB.js → chunk-KMU6QJB7.js} +1 -1
- package/dist/{chunk-PEEP2YR7.js → chunk-O2ANJFUF.js} +23 -1
- package/dist/{chunk-QCEQIRJQ.cjs → chunk-PI45JMP7.cjs} +163 -136
- package/dist/{chunk-UJGAA6AK.cjs → chunk-SWTUM32H.cjs} +23 -1
- package/dist/{chunk-ZQUANEK4.js → chunk-Y64YPIFT.js} +28 -1
- package/dist/commands/index.cjs +3 -3
- package/dist/commands/index.js +2 -2
- package/dist/diagram/index.cjs +7 -7
- package/dist/diagram/index.js +1 -1
- package/dist/image-editor/canvas-viewport.d.cts +52 -0
- package/dist/image-editor/canvas-viewport.d.ts +52 -0
- package/dist/image-editor/index.cjs +687 -596
- package/dist/image-editor/index.d.cts +1 -0
- package/dist/image-editor/index.d.ts +1 -0
- package/dist/image-editor/index.js +120 -29
- package/dist/image-editor/layers/ops.d.cts +21 -3
- package/dist/image-editor/layers/ops.d.ts +21 -3
- package/dist/image-editor/playback.d.cts +20 -1
- package/dist/image-editor/playback.d.ts +20 -1
- package/dist/image-editor/renderer.d.cts +7 -0
- package/dist/image-editor/renderer.d.ts +7 -0
- package/dist/paint-editor/index.cjs +12 -12
- package/dist/paint-editor/index.js +2 -2
- package/dist/tools/index.cjs +6 -4
- package/dist/tools/index.js +5 -3
- package/dist/tools/presence.d.cts +17 -0
- package/dist/tools/presence.d.ts +17 -0
- package/package.json +2 -2
- package/skills/pixerate-image-editor/SKILL.md +6 -6
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
resolveExternalAssets,
|
|
8
8
|
serializeLayers,
|
|
9
9
|
serializeLayersExternal
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-Y64YPIFT.js";
|
|
11
11
|
import "../chunk-3CI7FRMK.js";
|
|
12
12
|
import {
|
|
13
13
|
EffectRendererPool
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
PresenceStore,
|
|
54
54
|
realPresenceClock,
|
|
55
55
|
tweenPresenceCursor
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-O2ANJFUF.js";
|
|
57
57
|
import "../chunk-FLOGD3QB.js";
|
|
58
58
|
import {
|
|
59
59
|
BRUSH_ID,
|
package/dist/tools/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkERAGQL2Ncjs = require('../chunk-ERAGQL2N.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ var _chunkY4BWZB6Jcjs = require('../chunk-Y4BWZB6J.cjs');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkGMWNBSBScjs = require('../chunk-GMWNBSBS.cjs');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -90,7 +90,8 @@ var _chunk2BSBFBOAcjs = require('../chunk-2BSBFBOA.cjs');
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
var _chunkSWTUM32Hcjs = require('../chunk-SWTUM32H.cjs');
|
|
94
95
|
|
|
95
96
|
|
|
96
97
|
var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
|
|
@@ -175,4 +176,5 @@ var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
|
|
|
175
176
|
|
|
176
177
|
|
|
177
178
|
|
|
178
|
-
|
|
179
|
+
|
|
180
|
+
exports.AgentPlayback = _chunkGMWNBSBScjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; exports.EDITOR_CANVAS_TOOLS = _chunkSVFEVKLFcjs.EDITOR_CANVAS_TOOLS; exports.EDITOR_MCP_TOOLS = _chunkSVFEVKLFcjs.EDITOR_MCP_TOOLS; exports.EDITOR_PROMPT_TOOLS = _chunkSVFEVKLFcjs.EDITOR_PROMPT_TOOLS; exports.EDIT_OPERATION_REQUIRED_ARGUMENTS = _chunkSVFEVKLFcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkSVFEVKLFcjs.EXPORT_EXCLUDED_SELECTORS; exports.JSON_RPC_ERRORS = _chunkY4BWZB6Jcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkY4BWZB6Jcjs.MCP_PROTOCOL_VERSIONS; exports.MCP_TOOL_CANVAS_ADD_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_ADD_NODE; exports.MCP_TOOL_CANVAS_CONNECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_CONNECT; exports.MCP_TOOL_CANVAS_HIGHLIGHT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_HIGHLIGHT; exports.MCP_TOOL_CANVAS_LAYOUT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_LAYOUT; exports.MCP_TOOL_CANVAS_REMOVE_NODES = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_REMOVE_NODES; exports.MCP_TOOL_CANVAS_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_SELECT; exports.MCP_TOOL_CANVAS_UPDATE_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_UPDATE_NODE; exports.MCP_TOOL_EDIT_CANVAS = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkSVFEVKLFcjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_PROMPT_INSERT_TEXT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_INSERT_TEXT; exports.MCP_TOOL_PROMPT_REPLACE_RANGE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_REPLACE_RANGE; exports.MCP_TOOL_PROMPT_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SELECT; exports.MCP_TOOL_PROMPT_SET_VARIABLE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SET_VARIABLE; exports.MCP_TOOL_VIEW_EDITOR = _chunkSVFEVKLFcjs.MCP_TOOL_VIEW_EDITOR; exports.PRESENCE_COLORS = _chunkSWTUM32Hcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkSWTUM32Hcjs.PerformanceQueue; exports.PresenceStore = _chunkSWTUM32Hcjs.PresenceStore; exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkY4BWZB6Jcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkY4BWZB6Jcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunkY4BWZB6Jcjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunkY4BWZB6Jcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkY4BWZB6Jcjs.ToolRegistry; exports.ToolRegistryError = _chunkY4BWZB6Jcjs.ToolRegistryError; exports.ToolRegistryView = _chunkY4BWZB6Jcjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunkY4BWZB6Jcjs.baseToolName; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkY4BWZB6Jcjs.connectToolBridge; exports.createAgentPlayback = _chunkGMWNBSBScjs.createAgentPlayback; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkSWTUM32Hcjs.createInstantPresenceClock; exports.createMcpServer = _chunkY4BWZB6Jcjs.createMcpServer; exports.createPlaybackToolProvider = _chunkGMWNBSBScjs.createPlaybackToolProvider; exports.createToolRegistry = _chunkY4BWZB6Jcjs.createToolRegistry; exports.derivePlaybackSteps = _chunkGMWNBSBScjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkY4BWZB6Jcjs.errorResult; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkills = _chunkY4BWZB6Jcjs.listSkills; exports.locatePlaybackChrome = _chunkGMWNBSBScjs.locatePlaybackChrome; exports.parseSkillFrontmatter = _chunkY4BWZB6Jcjs.parseSkillFrontmatter; exports.playbackRectFromClient = _chunkGMWNBSBScjs.playbackRectFromClient; exports.playbackRefsFromArgs = _chunkGMWNBSBScjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunkGMWNBSBScjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkY4BWZB6Jcjs.readSkillFile; exports.readingTime = _chunkGMWNBSBScjs.readingTime; exports.realPresenceClock = _chunkSWTUM32Hcjs.realPresenceClock; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.runToolScript = _chunkERAGQL2Ncjs.runToolScript; exports.searchTokens = _chunkY4BWZB6Jcjs.searchTokens; exports.searchTools = _chunkY4BWZB6Jcjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunkY4BWZB6Jcjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunkY4BWZB6Jcjs.toToolResult; exports.toolResultError = _chunkERAGQL2Ncjs.toolResultError; exports.toolResultValue = _chunkERAGQL2Ncjs.toolResultValue; exports.toolsetInstructions = _chunkY4BWZB6Jcjs.toolsetInstructions; exports.toolsetName = _chunkY4BWZB6Jcjs.toolsetName; exports.trackPresenceDrag = _chunkSWTUM32Hcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkSWTUM32Hcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunkGMWNBSBScjs.unionRects; exports.unknownToolMessage = _chunkY4BWZB6Jcjs.unknownToolMessage; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
|
package/dist/tools/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
runToolScript,
|
|
3
3
|
toolResultError,
|
|
4
4
|
toolResultValue
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-KMU6QJB7.js";
|
|
6
6
|
import {
|
|
7
7
|
JSON_RPC_ERRORS,
|
|
8
8
|
MCP_PROTOCOL_VERSIONS,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
playbackRefsFromResult,
|
|
41
41
|
readingTime,
|
|
42
42
|
unionRects
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-6DXDUVSL.js";
|
|
44
44
|
import {
|
|
45
45
|
CAPTURE_EXCLUDE_SELECTOR,
|
|
46
46
|
CAPTURE_OVERLAY_SELECTORS,
|
|
@@ -89,8 +89,9 @@ import {
|
|
|
89
89
|
PresenceStore,
|
|
90
90
|
createInstantPresenceClock,
|
|
91
91
|
realPresenceClock,
|
|
92
|
+
trackPresenceDrag,
|
|
92
93
|
tweenPresenceCursor
|
|
93
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-O2ANJFUF.js";
|
|
94
95
|
import {
|
|
95
96
|
validateJsonSchema
|
|
96
97
|
} from "../chunk-V2ZCJRDM.js";
|
|
@@ -170,6 +171,7 @@ export {
|
|
|
170
171
|
toolResultValue,
|
|
171
172
|
toolsetInstructions,
|
|
172
173
|
toolsetName,
|
|
174
|
+
trackPresenceDrag,
|
|
173
175
|
tweenPresenceCursor,
|
|
174
176
|
unionCaptureRects,
|
|
175
177
|
unionRects,
|
|
@@ -80,3 +80,20 @@ export declare class PerformanceQueue {
|
|
|
80
80
|
constructor(presence: PresenceStore, options: PerformanceQueueOptions);
|
|
81
81
|
run<T>(actor: PresenceActorInfo, perform: () => Promise<T>): Promise<T>;
|
|
82
82
|
}
|
|
83
|
+
/** A box from where an agent's button went down to its cursor, in surface coordinates. */
|
|
84
|
+
export interface PresenceDragBox {
|
|
85
|
+
x: number;
|
|
86
|
+
y: number;
|
|
87
|
+
width: number;
|
|
88
|
+
height: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Follows a presence store for an agent's drag (press, move, release) and reports the box from
|
|
92
|
+
* the press to the cursor, so a surface can draw its own drag feedback (a crop box or a marquee
|
|
93
|
+
* being pulled out) under the agent's cursor. `onEnd` runs on release, or when the cursor leaves
|
|
94
|
+
* the surface mid-drag. Pass the result to `PresenceStore.subscribe`.
|
|
95
|
+
*/
|
|
96
|
+
export declare function trackPresenceDrag(handlers: {
|
|
97
|
+
onDrag: (box: PresenceDragBox) => void;
|
|
98
|
+
onEnd: () => void;
|
|
99
|
+
}): (state: PresenceState) => void;
|
package/dist/tools/presence.d.ts
CHANGED
|
@@ -80,3 +80,20 @@ export declare class PerformanceQueue {
|
|
|
80
80
|
constructor(presence: PresenceStore, options: PerformanceQueueOptions);
|
|
81
81
|
run<T>(actor: PresenceActorInfo, perform: () => Promise<T>): Promise<T>;
|
|
82
82
|
}
|
|
83
|
+
/** A box from where an agent's button went down to its cursor, in surface coordinates. */
|
|
84
|
+
export interface PresenceDragBox {
|
|
85
|
+
x: number;
|
|
86
|
+
y: number;
|
|
87
|
+
width: number;
|
|
88
|
+
height: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Follows a presence store for an agent's drag (press, move, release) and reports the box from
|
|
92
|
+
* the press to the cursor, so a surface can draw its own drag feedback (a crop box or a marquee
|
|
93
|
+
* being pulled out) under the agent's cursor. `onEnd` runs on release, or when the cursor leaves
|
|
94
|
+
* the surface mid-drag. Pass the result to `PresenceStore.subscribe`.
|
|
95
|
+
*/
|
|
96
|
+
export declare function trackPresenceDrag(handlers: {
|
|
97
|
+
onDrag: (box: PresenceDragBox) => void;
|
|
98
|
+
onEnd: () => void;
|
|
99
|
+
}): (state: PresenceState) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.150.1",
|
|
4
4
|
"description": "UI-agnostic rich text and media editing core library",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
"@tiptap/suggestion": "^2.27.3",
|
|
359
359
|
"markdown-it": "^15.0.3",
|
|
360
360
|
"markdown-it-task-lists": "^2.1.1",
|
|
361
|
-
"prosemirror-markdown": "^1.13.
|
|
361
|
+
"prosemirror-markdown": "^1.13.9"
|
|
362
362
|
},
|
|
363
363
|
"devDependencies": {
|
|
364
364
|
"@anthropic-ai/sdk": "0.137.0",
|
|
@@ -57,9 +57,9 @@ batching.
|
|
|
57
57
|
|
|
58
58
|
### Working with layers
|
|
59
59
|
|
|
60
|
-
1. **Read the stack** with `list_layers`. A photo opened in the editor has only the Background
|
|
61
|
-
|
|
62
|
-
`
|
|
60
|
+
1. **Read the stack** with `list_layers`. A photo opened in the editor has only the Background
|
|
61
|
+
(active); others may have pixel layers, groups and masks. Note which layer is `active`:
|
|
62
|
+
`set_adjustments` base controls edit the active pixel layer's `develop` filter.
|
|
63
63
|
2. **New content goes on its own layer**: `add_pixel_layer` (empty, a colour fill or a PNG at
|
|
64
64
|
`x`, `y`), `layer_via_copy` to lift a selection onto a layer, `duplicate_layer` before a
|
|
65
65
|
risky change. Name layers by intent.
|
|
@@ -151,8 +151,8 @@ drawing or editing either.
|
|
|
151
151
|
|
|
152
152
|
### Painting
|
|
153
153
|
|
|
154
|
-
1. **Paint on its own layer** (`add_pixel_layer`),
|
|
155
|
-
layer can be faded, masked
|
|
154
|
+
1. **Paint on its own layer** (`add_pixel_layer`), not on the Background (active on a new image, so
|
|
155
|
+
strokes without `layerId` land there) unless asked: a layer can be faded, masked or deleted.
|
|
156
156
|
2. **Retouch through masks**: to hide part of a layer, add a mask and paint black on it
|
|
157
157
|
(`paint_stroke` with `channel: "mask"`, `color: "#000000"`); paint white to bring it back.
|
|
158
158
|
A soft brush (`hardness` 0..0.3) gives soft transitions.
|
|
@@ -323,7 +323,7 @@ in the source frame at the document's bit depth, colour mode and profile. Read
|
|
|
323
323
|
| `set_active_layer` | Make a layer active (`layerId`) and choose the paint `target` (`pixels`, `mask`, or a smart object's `filter-mask`). Base sliders then edit that pixel layer's develop filter. Not an undo step. Returns the layer. |
|
|
324
324
|
| `add_pixel_layer` | Add a pixel layer above the active layer (or at `aboveId` / `belowId` / `parentId` / `index`): empty, `color` `#rrggbb[aa]` over the canvas, or `image` (PNG data URL or base64; other formats only in a browser) at `x`, `y`; with `name`, `opacity`, `blend`. Returns the layer with its id and bounds. |
|
|
325
325
|
| `duplicate_layer` | Copy a layer (groups with their children) directly above it, e.g. before a destructive change. Returns the copy. |
|
|
326
|
-
| `remove_layer` | Delete a layer or group (refused when locked). Prefer hiding with `set_layer_properties`. Returns the remaining top-level ids
|
|
326
|
+
| `remove_layer` | Delete a layer or group (refused when locked). Prefer hiding with `set_layer_properties`. Deleting the active layer makes the nearest paintable pixel layer below it active. Returns the remaining top-level ids and the new `activeLayerId`. |
|
|
327
327
|
| `move_layer` | Reorder: give exactly one of `aboveId`, `belowId`, `parentId` (into a group, optional `index`) or `index` alone. Returns the new `parentId` and `index`. |
|
|
328
328
|
| `set_layer_properties` | Change `name`, `visible`, `opacity`, `fillOpacity`, `blend` (`pass-through` for groups), `clipped`, `locks` or `collapsed`. Only given fields change. Returns the layer. |
|
|
329
329
|
| `group_layers` | Put sibling layers (`layerIds`) into a new pass-through group at the topmost one's position. Returns the group and its children. |
|