@pixerate/editor-react 0.97.0 → 0.98.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.
Files changed (36) hide show
  1. package/README.md +2 -2
  2. package/dist/animation-editor/index.cjs +2 -2
  3. package/dist/animation-editor/index.js +1 -1
  4. package/dist/canvas/index.cjs +2 -2
  5. package/dist/canvas/index.js +1 -1
  6. package/dist/chart/index.cjs +2 -2
  7. package/dist/chart/index.js +1 -1
  8. package/dist/{chunk-7I73DW4V.js → chunk-NEQI2ZIU.js} +1 -1
  9. package/dist/{chunk-GECXTPSH.js → chunk-S6C2W5JW.js} +1 -1
  10. package/dist/{chunk-IPVWWVSF.js → chunk-SI2V7XPZ.js} +2 -2
  11. package/dist/{chunk-NC4RLZTK.js → chunk-TFEKLNC7.js} +3082 -3030
  12. package/dist/image-editor/ImageEditor.d.cts +3 -1
  13. package/dist/image-editor/ImageEditor.d.ts +3 -1
  14. package/dist/image-editor/ImageEditorCanvas.d.cts +77 -0
  15. package/dist/image-editor/ImageEditorCanvas.d.ts +77 -0
  16. package/dist/image-editor/ImageEffectControls.d.cts +12 -0
  17. package/dist/image-editor/ImageEffectControls.d.ts +12 -0
  18. package/dist/image-editor/index.cjs +4712 -4665
  19. package/dist/image-editor/index.d.cts +2 -0
  20. package/dist/image-editor/index.d.ts +2 -0
  21. package/dist/image-editor/index.js +6 -2
  22. package/dist/index.cjs +5133 -5086
  23. package/dist/index.js +8 -4
  24. package/dist/paint-editor/index.cjs +2 -2
  25. package/dist/paint-editor/index.js +1 -1
  26. package/dist/parameters/index.cjs +2 -2
  27. package/dist/parameters/index.js +2 -2
  28. package/dist/playback/PresenceLayer.d.cts +3 -1
  29. package/dist/playback/PresenceLayer.d.ts +3 -1
  30. package/dist/spreadsheet/index.cjs +2 -2
  31. package/dist/spreadsheet/index.js +2 -2
  32. package/dist/vector/index.cjs +2 -2
  33. package/dist/vector/index.js +1 -1
  34. package/dist/video-editor/index.cjs +2 -2
  35. package/dist/video-editor/index.js +1 -1
  36. package/package.json +1 -1
package/README.md CHANGED
@@ -96,7 +96,7 @@ useAgentToolProvider(registry, provider);
96
96
  | :--- | :--- |
97
97
  | `@pixerate/editor-react` | `usePromptEditor`, `useEditor`, `EditorContent`, `BubbleMenu`, `TemplateRenderer`, `useHistory`, `useHistoryDirty`, `useHistoryShortcuts`, `useNavigationGuard`, `useDismissGuard`, `EditorSlotsProvider` / `useEditorSlots`, `SpreadsheetEditor` / `useSpreadsheetEditor`, `FormulaHints`, `DirtyTracker` |
98
98
  | `@pixerate/editor-react/spreadsheet` | `SpreadsheetEditor` (virtualised for large sheets, `virtualize` prop), `useSpreadsheetEditor`, `useSpreadsheetViewport`, `useSpreadsheetTableInteractions`, `FormulaHints`, `SpreadsheetContextMenu`, `SpreadsheetGroupRow`, `SheetTabs`, `NameManager` (also re-exported from the root entry) |
99
- | `@pixerate/editor-react/image-editor` | `ImageEditor`, `useImageEditor`: crop, rotate/flip, adjustments, annotations, depth masks, Select & Mask (`SelectionOptionsBar`, `RefineEdgePanel`: magic wand, marquees, lasso, Refine Edge, layer masks), and `onInpaint` / `onRemoveBackground` AI hooks |
99
+ | `@pixerate/editor-react/image-editor` | `ImageEditor`, `useImageEditor`, `ImageEditorCanvas` (the canvas alone, for your own chrome; see `docs/image-editor-canvas.md`), `ImageEffectControls`: crop, rotate/flip, adjustments, annotations, depth masks, Select & Mask (`SelectionOptionsBar`, `RefineEdgePanel`: magic wand, marquees, lasso, Refine Edge, layer masks), and `onInpaint` / `onRemoveBackground` AI hooks |
100
100
  | `@pixerate/editor-react/paint-editor` | `PaintEditor`, `usePaintEditor`: natural-media painting with `PaintCanvas` (pen pressure, tilt and twist, coalesced and predicted events, palm rejection, view rotation and mirroring), `PaintToolbar` (tools, symmetry, perspective, tracing and reference images, save / open, PNG / JPEG / PSD), `BrushPanel` (library with thumbnails), `PaperPanel`, `ColorPanel` (wheel, harmonies, swatches, mixing pad) and `PaintLayersPanel` |
101
101
  | `@pixerate/editor-react/commands` | `CommandPalette`, `useCommandPalette` (`hotkey: "Mod+K"`), `useCommandShortcuts`, `useRegisterCommands` over a `CommandRegistry` from `@pixerate/editor/commands` (also re-exported from the root entry) |
102
102
  | `@pixerate/editor-react/persistence` | `useAutosave` (crash-recovery snapshots bound to a history / dirty flag, flushed on `pagehide`, with a recovery check on mount), `useEditorAutosave` (the same for any editor's `EditorDocument`, e.g. `useMermaidDiagram().editorDocument`; `restore` loads the snapshot into the editor) and `<RecoveryPrompt>` (also re-exported from the root entry) |
@@ -130,7 +130,7 @@ The components are styled with [Tailwind CSS](https://tailwindcss.com) utility c
130
130
 
131
131
  2. **Define the theme colors.** `SpreadsheetEditor`, `BubbleMenu`, `TemplateRenderer` and the slot components use [shadcn/ui](https://ui.shadcn.com)-style tokens: `background`, `foreground`, `muted`, `muted-foreground`, `border`, `input`, `primary`, `popover`, `popover-foreground` and `destructive`. Projects already using shadcn/ui have these. Otherwise, define them as colors in your Tailwind theme.
132
132
 
133
- `ImageEditor` uses a fixed dark (slate) palette and only needs step 1. Without Tailwind, the components work but render unstyled. Pass `className` to override.
133
+ `ImageEditor`, `ImageEditorCanvas` and the image panels use the same theme tokens (plus `accent`, `primary-foreground` and `accent-foreground`), so they follow your light or dark theme; their shared classes are in `image-editor/styles.ts`. Without Tailwind, the components work but render unstyled. Pass `className` to override.
134
134
 
135
135
  ## License
136
136
 
@@ -270,7 +270,7 @@ function usePlaybackSurface(playback, id, options = {}, sharedPresence) {
270
270
  // src/playback/PresenceLayer.tsx
271
271
  var import_react5 = __toESM(require("react"), 1);
272
272
  var import_jsx_runtime4 = require("react/jsx-runtime");
273
- function PresenceLayer({ presence, viewport, className = "" }) {
273
+ function PresenceLayer({ presence, viewport, clip = true, className = "" }) {
274
274
  const { actors } = (0, import_react5.useSyncExternalStore)(presence.subscribe, presence.getState, presence.getState);
275
275
  if (!actors.length) return null;
276
276
  const map = typeof viewport === "function" ? viewport : viewport ? (p) => ({ x: p.x * viewport.zoom + viewport.x, y: p.y * viewport.zoom + viewport.y }) : (p) => p;
@@ -280,7 +280,7 @@ function PresenceLayer({ presence, viewport, className = "" }) {
280
280
  className: `pixerate-presence ${className}`.trim(),
281
281
  "aria-hidden": "true",
282
282
  "data-testid": "presence-layer",
283
- style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: "hidden", zIndex: 50 },
283
+ style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: clip ? "hidden" : "visible", zIndex: 50 },
284
284
  children: actors.map((a) => {
285
285
  const at = map(a);
286
286
  const ring = a.focus && (() => {
@@ -11,7 +11,7 @@ import {
11
11
  PresenceLayer,
12
12
  useAgentPlayback,
13
13
  usePlaybackSurface
14
- } from "../chunk-IPVWWVSF.js";
14
+ } from "../chunk-SI2V7XPZ.js";
15
15
 
16
16
  // src/animation-editor/useAnimationEditor.ts
17
17
  import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
@@ -469,7 +469,7 @@ function AgentPresenceLayer({ presences, className = "" }) {
469
469
  // src/playback/PresenceLayer.tsx
470
470
  var import_react = __toESM(require("react"), 1);
471
471
  var import_jsx_runtime2 = require("react/jsx-runtime");
472
- function PresenceLayer({ presence, viewport, className = "" }) {
472
+ function PresenceLayer({ presence, viewport, clip = true, className = "" }) {
473
473
  const { actors } = (0, import_react.useSyncExternalStore)(presence.subscribe, presence.getState, presence.getState);
474
474
  if (!actors.length) return null;
475
475
  const map = typeof viewport === "function" ? viewport : viewport ? (p) => ({ x: p.x * viewport.zoom + viewport.x, y: p.y * viewport.zoom + viewport.y }) : (p) => p;
@@ -479,7 +479,7 @@ function PresenceLayer({ presence, viewport, className = "" }) {
479
479
  className: `pixerate-presence ${className}`.trim(),
480
480
  "aria-hidden": "true",
481
481
  "data-testid": "presence-layer",
482
- style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: "hidden", zIndex: 50 },
482
+ style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: clip ? "hidden" : "visible", zIndex: 50 },
483
483
  children: actors.map((a) => {
484
484
  const at = map(a);
485
485
  const ring = a.focus && (() => {
@@ -9,7 +9,7 @@ import "../chunk-3I7FOSLF.js";
9
9
  import {
10
10
  PresenceLayer,
11
11
  usePlaybackSurface
12
- } from "../chunk-IPVWWVSF.js";
12
+ } from "../chunk-SI2V7XPZ.js";
13
13
 
14
14
  // src/canvas/AgentPresenceLayer.tsx
15
15
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -835,7 +835,7 @@ function usePlaybackSurface(playback, id, options = {}, sharedPresence) {
835
835
  // src/playback/PresenceLayer.tsx
836
836
  var import_react7 = __toESM(require("react"), 1);
837
837
  var import_jsx_runtime5 = require("react/jsx-runtime");
838
- function PresenceLayer({ presence, viewport, className = "" }) {
838
+ function PresenceLayer({ presence, viewport, clip = true, className = "" }) {
839
839
  const { actors } = (0, import_react7.useSyncExternalStore)(presence.subscribe, presence.getState, presence.getState);
840
840
  if (!actors.length) return null;
841
841
  const map = typeof viewport === "function" ? viewport : viewport ? (p) => ({ x: p.x * viewport.zoom + viewport.x, y: p.y * viewport.zoom + viewport.y }) : (p) => p;
@@ -845,7 +845,7 @@ function PresenceLayer({ presence, viewport, className = "" }) {
845
845
  className: `pixerate-presence ${className}`.trim(),
846
846
  "aria-hidden": "true",
847
847
  "data-testid": "presence-layer",
848
- style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: "hidden", zIndex: 50 },
848
+ style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: clip ? "hidden" : "visible", zIndex: 50 },
849
849
  children: actors.map((a) => {
850
850
  const at = map(a);
851
851
  const ring = a.focus && (() => {
@@ -25,7 +25,7 @@ import {
25
25
  PresenceLayer,
26
26
  useAgentPlayback,
27
27
  usePlaybackSurface
28
- } from "../chunk-IPVWWVSF.js";
28
+ } from "../chunk-SI2V7XPZ.js";
29
29
 
30
30
  // src/chart/ChartEditor.tsx
31
31
  import { useRef, useState } from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  usePlaybackSurface
3
- } from "./chunk-IPVWWVSF.js";
3
+ } from "./chunk-SI2V7XPZ.js";
4
4
 
5
5
  // src/playback/useElementPlaybackSurface.ts
6
6
  import { useRef } from "react";
@@ -2,7 +2,7 @@ import {
2
2
  PresenceLayer,
3
3
  useAgentPlayback,
4
4
  usePlaybackSurface
5
- } from "./chunk-IPVWWVSF.js";
5
+ } from "./chunk-SI2V7XPZ.js";
6
6
 
7
7
  // src/spreadsheet/useSpreadsheetEditor.ts
8
8
  import { useState, useRef, useCallback, useMemo } from "react";
@@ -1,7 +1,7 @@
1
1
  // src/playback/PresenceLayer.tsx
2
2
  import React, { useSyncExternalStore } from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
- function PresenceLayer({ presence, viewport, className = "" }) {
4
+ function PresenceLayer({ presence, viewport, clip = true, className = "" }) {
5
5
  const { actors } = useSyncExternalStore(presence.subscribe, presence.getState, presence.getState);
6
6
  if (!actors.length) return null;
7
7
  const map = typeof viewport === "function" ? viewport : viewport ? (p) => ({ x: p.x * viewport.zoom + viewport.x, y: p.y * viewport.zoom + viewport.y }) : (p) => p;
@@ -11,7 +11,7 @@ function PresenceLayer({ presence, viewport, className = "" }) {
11
11
  className: `pixerate-presence ${className}`.trim(),
12
12
  "aria-hidden": "true",
13
13
  "data-testid": "presence-layer",
14
- style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: "hidden", zIndex: 50 },
14
+ style: { position: "absolute", inset: 0, pointerEvents: "none", overflow: clip ? "hidden" : "visible", zIndex: 50 },
15
15
  children: actors.map((a) => {
16
16
  const at = map(a);
17
17
  const ring = a.focus && (() => {