@pixerate/editor-react 0.17.0 → 0.18.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/README.md +3 -1
- package/dist/canvas/index.cjs +880 -193
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +214 -3
- package/dist/canvas/index.d.ts +214 -3
- package/dist/canvas/index.js +699 -0
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-JR5ZBDR7.js → chunk-34HEZX7J.js} +206 -74
- package/dist/chunk-34HEZX7J.js.map +1 -0
- package/dist/index.cjs +1437 -1109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -5
- package/dist/index.d.ts +104 -5
- package/dist/index.js +350 -146
- package/dist/index.js.map +1 -1
- package/dist/spreadsheet/index.cjs +261 -135
- package/dist/spreadsheet/index.cjs.map +1 -1
- package/dist/spreadsheet/index.d.cts +39 -3
- package/dist/spreadsheet/index.d.ts +39 -3
- package/dist/spreadsheet/index.js +5 -3
- package/package.json +2 -2
- package/dist/chunk-JR5ZBDR7.js.map +0 -1
package/README.md
CHANGED
|
@@ -77,6 +77,8 @@ const editor = useEditor({ extensions: [Comments.configure({ author: me }), Trac
|
|
|
77
77
|
|
|
78
78
|
`FindReplaceBar` is a Word-style find bar for editors with the `FindReplace` extension (`useEditor({ richTextOptions: { findReplace: true } })`): it appears on Mod+F / Mod+H (or `editor.commands.openFindReplace()`), with find and replace fields, option toggles (match case, whole words, wildcards, regex, plus prefix/suffix/ignore punctuation/white space under "More options"), a "3 of 12" counter, previous/next, Replace and Replace all. Enter / Shift+Enter step, Enter in the replace field replaces, Mod+Enter replaces all, Escape closes. Pass `alwaysOpen` to keep it visible. `useFindReplace(editor)` exposes the state and commands for custom UIs.
|
|
79
79
|
|
|
80
|
+
Tables are on by default in `useEditor` (`richTextOptions: { table: false }` turns them off). `<TableToolbar editor={editor} />` shows row, column, merge/split, header and alignment buttons while the selection is in a table (disabled buttons explain why in their tooltip; `items` picks the buttons, `showWhenOutside` keeps it visible). `<TableBubbleMenu editor={editor} />` shows the same toolbar in a bubble menu next to the cursor, and `<InsertTableGrid editor={editor} onInsert={…} />` is a Word-style size picker. `useTableMenu(editor)` exposes the table state and `run(action, params)` for custom UIs.
|
|
81
|
+
|
|
80
82
|
`useEditor({ fileImport: true, richClipboard: true })` imports dropped/pasted `.md`, `.html`, `.txt`, `.rtf` and `.docx` files (plus any adapter you register, e.g. PDF or zipped exports) at the drop position and copies lossless slices between editors. `useFileImport(editor)` returns `{ openFilePicker, importFiles, accept, isImporting, error }` for an import button. `usePromptEditor({ fileImport: true })` imports dropped files as plain text.
|
|
81
83
|
|
|
82
84
|
`useAgentToolProvider(registry, provider)` registers an agent tool provider (see `ToolRegistry` in `@pixerate/editor/agent`) while the component is mounted. Memoize the provider:
|
|
@@ -91,7 +93,7 @@ useAgentToolProvider(registry, provider);
|
|
|
91
93
|
| Import | Exports |
|
|
92
94
|
| :--- | :--- |
|
|
93
95
|
| `@pixerate/editor-react` | `usePromptEditor`, `useEditor`, `EditorContent`, `BubbleMenu`, `TemplateRenderer`, `useHistory`, `useHistoryDirty`, `useHistoryShortcuts`, `useNavigationGuard`, `useDismissGuard`, `EditorSlotsProvider` / `useEditorSlots`, `SpreadsheetEditor` / `useSpreadsheetEditor`, `FormulaHints`, `DirtyTracker` |
|
|
94
|
-
| `@pixerate/editor-react/spreadsheet` | `SpreadsheetEditor
|
|
96
|
+
| `@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) |
|
|
95
97
|
| `@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 |
|
|
96
98
|
| `@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) |
|
|
97
99
|
| `@pixerate/editor-react/persistence` | `useAutosave` (crash-recovery snapshots bound to a history / dirty flag, flushed on `pagehide`, with a recovery check on mount) and `<RecoveryPrompt>` (also re-exported from the root entry) |
|