@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.
- package/README.md +2 -2
- package/dist/animation-editor/index.cjs +2 -2
- package/dist/animation-editor/index.js +1 -1
- package/dist/canvas/index.cjs +2 -2
- package/dist/canvas/index.js +1 -1
- package/dist/chart/index.cjs +2 -2
- package/dist/chart/index.js +1 -1
- package/dist/{chunk-7I73DW4V.js → chunk-NEQI2ZIU.js} +1 -1
- package/dist/{chunk-GECXTPSH.js → chunk-S6C2W5JW.js} +1 -1
- package/dist/{chunk-IPVWWVSF.js → chunk-SI2V7XPZ.js} +2 -2
- package/dist/{chunk-NC4RLZTK.js → chunk-TFEKLNC7.js} +3082 -3030
- package/dist/image-editor/ImageEditor.d.cts +3 -1
- package/dist/image-editor/ImageEditor.d.ts +3 -1
- package/dist/image-editor/ImageEditorCanvas.d.cts +77 -0
- package/dist/image-editor/ImageEditorCanvas.d.ts +77 -0
- package/dist/image-editor/ImageEffectControls.d.cts +12 -0
- package/dist/image-editor/ImageEffectControls.d.ts +12 -0
- package/dist/image-editor/index.cjs +4712 -4665
- package/dist/image-editor/index.d.cts +2 -0
- package/dist/image-editor/index.d.ts +2 -0
- package/dist/image-editor/index.js +6 -2
- package/dist/index.cjs +5133 -5086
- package/dist/index.js +8 -4
- package/dist/paint-editor/index.cjs +2 -2
- package/dist/paint-editor/index.js +1 -1
- package/dist/parameters/index.cjs +2 -2
- package/dist/parameters/index.js +2 -2
- package/dist/playback/PresenceLayer.d.cts +3 -1
- package/dist/playback/PresenceLayer.d.ts +3 -1
- package/dist/spreadsheet/index.cjs +2 -2
- package/dist/spreadsheet/index.js +2 -2
- package/dist/vector/index.cjs +2 -2
- package/dist/vector/index.js +1 -1
- package/dist/video-editor/index.cjs +2 -2
- package/dist/video-editor/index.js +1 -1
- 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`
|
|
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-
|
|
14
|
+
} from "../chunk-SI2V7XPZ.js";
|
|
15
15
|
|
|
16
16
|
// src/animation-editor/useAnimationEditor.ts
|
|
17
17
|
import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
package/dist/canvas/index.cjs
CHANGED
|
@@ -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 && (() => {
|
package/dist/canvas/index.js
CHANGED
package/dist/chart/index.cjs
CHANGED
|
@@ -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 && (() => {
|
package/dist/chart/index.js
CHANGED
|
@@ -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 && (() => {
|