@pixerate/editor-react 0.16.0 → 0.17.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/canvas/index.cjs +406 -142
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +66 -3
- package/dist/canvas/index.d.ts +66 -3
- package/dist/canvas/index.js +277 -0
- package/dist/canvas/index.js.map +1 -1
- package/dist/chunk-I3E4KSA2.js +515 -0
- package/dist/chunk-I3E4KSA2.js.map +1 -0
- package/dist/chunk-JR5ZBDR7.js +2012 -0
- package/dist/chunk-JR5ZBDR7.js.map +1 -0
- package/dist/{chunk-XTFR3IMK.js → chunk-ZU54BMDC.js} +473 -160
- package/dist/chunk-ZU54BMDC.js.map +1 -0
- package/dist/generation/index.cjs +290 -0
- package/dist/generation/index.cjs.map +1 -1
- package/dist/generation/index.d.cts +66 -2
- package/dist/generation/index.d.ts +66 -2
- package/dist/generation/index.js +7 -1
- package/dist/image-editor/index.cjs +490 -187
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +34 -2
- package/dist/image-editor/index.d.ts +34 -2
- package/dist/image-editor/index.js +5 -1
- package/dist/index.cjs +2372 -731
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +88 -6
- package/dist/index.d.ts +88 -6
- package/dist/index.js +334 -96
- package/dist/index.js.map +1 -1
- package/dist/spreadsheet/index.cjs +943 -112
- package/dist/spreadsheet/index.cjs.map +1 -1
- package/dist/spreadsheet/index.d.cts +119 -7
- package/dist/spreadsheet/index.d.ts +119 -7
- package/dist/spreadsheet/index.js +11 -1
- package/dist/tokens/index.cjs +395 -0
- package/dist/tokens/index.cjs.map +1 -0
- package/dist/tokens/index.d.cts +54 -0
- package/dist/tokens/index.d.ts +54 -0
- package/dist/tokens/index.js +375 -0
- package/dist/tokens/index.js.map +1 -0
- package/package.json +10 -2
- package/dist/chunk-7SPRQZ6H.js +0 -216
- package/dist/chunk-7SPRQZ6H.js.map +0 -1
- package/dist/chunk-FYIPXHAE.js +0 -1169
- package/dist/chunk-FYIPXHAE.js.map +0 -1
- package/dist/chunk-XTFR3IMK.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as _tiptap_core from '@tiptap/core';
|
|
2
2
|
import { Editor } from '@tiptap/core';
|
|
3
|
-
import { Template, ColorGradient, FileImportOptions, RichTextPresetOptions, RichClipboardOptions, HistoryState, HistoryManager, HistoryEntry, Command, MergedExecutionOptions, HistoryMark, HistoryManagerOptions, DirtyTrackerOptions, DirtyTracker, FileImportState, FileImportController, FileImportControllerOptions, PromptValues, ParseDataSourceOptions, MergeRecordsOptions, MergeRecordsResult, MergeDataSource, MergeRecord, OutlineSnapshot, OutlineHeading, EditorSlotsMap, CommentStoreSnapshot, CommentStore, TrackChangesSnapshot, TrackedChange, ReviewAuthor, CompareSummary, CompareSource, EditorCompareOptions, FindReplaceSnapshot, FindReplaceMode, FindOptions } from '@pixerate/editor';
|
|
4
|
-
export { BindDirtyToHistoryOptions, ColorGradient, Command, CompareSource, CompareSummary, DirtyTracker, DirtyTrackerOptions, EditorCompareOptions, HistoryDirtyBinding, HistoryEntry, HistoryManager, HistoryManagerOptions, HistoryMark, HistoryState, MergeDataSource, MergeOutput, MergeRecord, MergeRecordsResult, MergedExecutionOptions, OutlineHeading, OutlineSnapshot, OutlineTreeItem, PromptDiagnostic, PromptValues, RichTextPresetOptions, Template, TemplateVersion, Token, TokenType, VariableFormField, bindDirtyToHistory, createDirtyTracker, createHistoryManager, defaultIsEqual, withoutDirty } from '@pixerate/editor';
|
|
3
|
+
import { Template, ColorGradient, FileImportOptions, RichTextPresetOptions, RichClipboardOptions, HistoryState, HistoryManager, HistoryEntry, Command, MergedExecutionOptions, HistoryMark, HistoryManagerOptions, DirtyTrackerOptions, DirtyTracker, FileImportState, ImportStructureSummary, FileImportController, FileImportControllerOptions, PromptValues, ParseDataSourceOptions, MergeRecordsOptions, MergeRecordsResult, MergeDataSource, MergeRecord, OutlineSnapshot, OutlineHeading, ParagraphStylesSnapshot, StyleRegistry, StyleDefinition, CreateStyleFromSelectionOptions, EditorSlotsMap, CommentStoreSnapshot, CommentStore, TrackChangesSnapshot, TrackedChange, ReviewAuthor, CompareSummary, CompareSource, EditorCompareOptions, FindReplaceSnapshot, FindReplaceMode, FindOptions } from '@pixerate/editor';
|
|
4
|
+
export { BindDirtyToHistoryOptions, ColorGradient, Command, CompareSource, CompareSummary, DirtyTracker, DirtyTrackerOptions, EditorCompareOptions, HistoryDirtyBinding, HistoryEntry, HistoryManager, HistoryManagerOptions, HistoryMark, HistoryState, MergeDataSource, MergeOutput, MergeRecord, MergeRecordsResult, MergedExecutionOptions, OutlineHeading, OutlineSnapshot, OutlineTreeItem, ParagraphStylesSnapshot, PromptDiagnostic, PromptValues, RichTextPresetOptions, StyleDefinition, Template, TemplateVersion, Token, TokenType, VariableFormField, bindDirtyToHistory, createDirtyTracker, createHistoryManager, defaultIsEqual, withoutDirty } from '@pixerate/editor';
|
|
5
5
|
import { UseEditorOptions, EditorContentProps as EditorContentProps$1 } from '@tiptap/react';
|
|
6
6
|
import { HistoryManager as HistoryManager$1 } from '@pixerate/editor/history';
|
|
7
7
|
import { ToolRegistry, AgentToolProvider } from '@pixerate/editor/agent';
|
|
8
8
|
import React__default from 'react';
|
|
9
9
|
import { BubbleMenuPluginProps } from '@tiptap/extension-bubble-menu';
|
|
10
|
-
export { FormulaHints, FormulaHintsProps, SpreadsheetContextMenu, SpreadsheetContextMenuProps, SpreadsheetEditor, SpreadsheetEditorProps, SpreadsheetGroupRow, SpreadsheetGroupRowProps, useFillHandle, useSpreadsheetClipboard, useSpreadsheetEditor } from './spreadsheet/index.cjs';
|
|
11
|
-
export { AdjustmentLayersPanel, AdjustmentLayersPanelProps, ControlSlider, ControlSliderProps, CurvesEditor, CurvesEditorProps, Histogram, HistogramProps, ImageEditor, ImageEditorProps, UseImageEditorReturn, useImageEditor, useImageHistogram } from './image-editor/index.cjs';
|
|
10
|
+
export { FormulaHints, FormulaHintsProps, NameManager, NameManagerProps, SheetTabs, SheetTabsProps, SpreadsheetConditionalFormatPanel, SpreadsheetContextMenu, SpreadsheetContextMenuProps, SpreadsheetDataValidationPanel, SpreadsheetEditor, SpreadsheetEditorProps, SpreadsheetGroupRow, SpreadsheetGroupRowProps, SpreadsheetRulePanelProps, SpreadsheetValidationDialog, SpreadsheetValidationDialogProps, useFillHandle, useSpreadsheetClipboard, useSpreadsheetEditor } from './spreadsheet/index.cjs';
|
|
11
|
+
export { AdjustmentLayersPanel, AdjustmentLayersPanelProps, ControlSlider, ControlSliderProps, CurvesEditor, CurvesEditorProps, Histogram, HistogramProps, ImageEditor, ImageEditorProps, RefineEdgePanel, RefineEdgePanelProps, SelectionOptionsBar, SelectionOptionsBarProps, UseImageEditorReturn, useImageEditor, useImageHistogram } from './image-editor/index.cjs';
|
|
12
12
|
export { CommandPalette, CommandPaletteProps, UseCommandPaletteOptions, UseCommandPaletteResult, UseCommandShortcutsOptions, useCommandPalette, useCommandShortcuts, useRegisterCommands } from './commands/index.cjs';
|
|
13
13
|
export { RecoveryPrompt, RecoveryPromptProps, UseAutosaveOptions, UseAutosaveResult, useAutosave } from './persistence/index.cjs';
|
|
14
|
-
export { GenerationSettings, GenerationSettingsProps, JobProgress, JobProgressProps, UseJobProgressOptions, useGenerationPlan, useJobProgress } from './generation/index.cjs';
|
|
14
|
+
export { AssetMentionChips, AssetMentionChipsProps, GenerationHistory, GenerationHistoryProps, GenerationSettings, GenerationSettingsProps, JobProgress, JobProgressProps, UseGenerationRecordsResult, UseJobProgressOptions, useGenerationPlan, useGenerationRecords, useJobProgress } from './generation/index.cjs';
|
|
15
15
|
import '@pixerate/editor/spreadsheet';
|
|
16
16
|
import '@pixerate/editor/image-editor';
|
|
17
17
|
import '@pixerate/editor/commands';
|
|
@@ -225,6 +225,13 @@ interface HistoryShortcutsOptions {
|
|
|
225
225
|
declare function useHistoryShortcuts(manager: HistoryManager$1, options?: HistoryShortcutsOptions): void;
|
|
226
226
|
|
|
227
227
|
interface UseFileImportResult extends FileImportState {
|
|
228
|
+
/**
|
|
229
|
+
* Structures detected in the last import (headings, lists, tables, columns),
|
|
230
|
+
* or `null` when no adapter reported any (only structure-aware adapters such
|
|
231
|
+
* as PDF do). Turn PDF detection off with
|
|
232
|
+
* `useFileImport(editor, { adapterOptions: { pdf: { structure: false } } })`.
|
|
233
|
+
*/
|
|
234
|
+
structureSummary: ImportStructureSummary | null;
|
|
228
235
|
/** Value for `<input type="file" accept={…}>`. */
|
|
229
236
|
accept: string;
|
|
230
237
|
/** Opens the browser file picker and imports the chosen files at the selection. */
|
|
@@ -429,6 +436,58 @@ interface OutlinePanelProps {
|
|
|
429
436
|
*/
|
|
430
437
|
declare const OutlinePanel: React__default.FC<OutlinePanelProps>;
|
|
431
438
|
|
|
439
|
+
interface UseParagraphStylesResult extends ParagraphStylesSnapshot {
|
|
440
|
+
registry: StyleRegistry | null;
|
|
441
|
+
/** The style of the block at the selection. */
|
|
442
|
+
currentStyle: StyleDefinition | null;
|
|
443
|
+
/** Applies a paragraph style to the selected blocks. */
|
|
444
|
+
apply: (id: string) => boolean;
|
|
445
|
+
/** Resets the selected blocks to Normal. */
|
|
446
|
+
clear: () => boolean;
|
|
447
|
+
/** Updates a style (default: the current one) to the formatting at the selection. */
|
|
448
|
+
updateFromSelection: (id?: string) => boolean;
|
|
449
|
+
/** Creates (and applies) a style from the formatting at the selection; returns its id. */
|
|
450
|
+
createFromSelection: (name: string, options?: CreateStyleFromSelectionOptions) => string | null;
|
|
451
|
+
/** Applies a character style to the selection. */
|
|
452
|
+
applyCharacterStyle: (id: string) => boolean;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Subscribes to an editor's paragraph styles (`ParagraphStyles` extension):
|
|
456
|
+
* the gallery, all styles and the style at the selection, with commands.
|
|
457
|
+
* Re-renders only when the styles or the current style change.
|
|
458
|
+
*/
|
|
459
|
+
declare function useParagraphStyles(editor: Editor | null | undefined): UseParagraphStylesResult;
|
|
460
|
+
|
|
461
|
+
interface StylesGalleryProps {
|
|
462
|
+
editor: Editor | null;
|
|
463
|
+
/**
|
|
464
|
+
* `dropdown` (default): a button showing the current style that opens the
|
|
465
|
+
* list. `gallery`: the styles are always shown, in a row.
|
|
466
|
+
*/
|
|
467
|
+
variant?: "dropdown" | "gallery";
|
|
468
|
+
/** List every available paragraph style instead of the gallery (quick) styles. */
|
|
469
|
+
showAllStyles?: boolean;
|
|
470
|
+
/** Show the "Update to match selection" and "New style from selection" actions. Defaults to `true`. */
|
|
471
|
+
showActions?: boolean;
|
|
472
|
+
/** Preview each style's font, weight, style and color in its entry. Defaults to `true`. */
|
|
473
|
+
preview?: boolean;
|
|
474
|
+
className?: string;
|
|
475
|
+
itemClassName?: string;
|
|
476
|
+
activeItemClassName?: string;
|
|
477
|
+
/** Called after a style is applied, updated or created. */
|
|
478
|
+
onChange?: (event: {
|
|
479
|
+
type: "apply" | "update" | "create";
|
|
480
|
+
id: string;
|
|
481
|
+
}) => void;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Paragraph styles picker (Word's Styles gallery): shows the style at the
|
|
485
|
+
* selection, applies a style on click, updates the current style to match
|
|
486
|
+
* the selection and creates a new style from the selection. Needs the
|
|
487
|
+
* `ParagraphStyles` extension (`richTextOptions: { paragraphStyles: true }`).
|
|
488
|
+
*/
|
|
489
|
+
declare const StylesGallery: React__default.FC<StylesGalleryProps>;
|
|
490
|
+
|
|
432
491
|
interface EditorSlotsProviderProps {
|
|
433
492
|
slots?: Partial<EditorSlotsMap>;
|
|
434
493
|
children: React__default.ReactNode;
|
|
@@ -460,6 +519,12 @@ interface UseTrackChangesResult extends TrackChangesSnapshot {
|
|
|
460
519
|
rejectAll: () => void;
|
|
461
520
|
next: () => void;
|
|
462
521
|
previous: () => void;
|
|
522
|
+
/** Selects a change in the editor. */
|
|
523
|
+
select: (id: string) => void;
|
|
524
|
+
/** Accepts a tracked move (both ends). */
|
|
525
|
+
acceptMove: (id: string) => void;
|
|
526
|
+
/** Rejects a tracked move (both ends). */
|
|
527
|
+
rejectMove: (id: string) => void;
|
|
463
528
|
}
|
|
464
529
|
/**
|
|
465
530
|
* Subscribes to the tracked-change state of an editor using the
|
|
@@ -534,6 +599,23 @@ interface UseDocumentCompareResult {
|
|
|
534
599
|
*/
|
|
535
600
|
declare function useDocumentCompare(editor: Editor | null | undefined, options?: EditorCompareOptions): UseDocumentCompareResult;
|
|
536
601
|
|
|
602
|
+
interface TrackedChangesListProps {
|
|
603
|
+
editor: Editor | null;
|
|
604
|
+
className?: string;
|
|
605
|
+
itemClassName?: string;
|
|
606
|
+
activeItemClassName?: string;
|
|
607
|
+
/** Content shown when there are no changes. */
|
|
608
|
+
emptyState?: React__default.ReactNode;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Lists the document's tracked changes (insertions, deletions, moves,
|
|
612
|
+
* formatting and block changes) with their author and description, and
|
|
613
|
+
* accepts or rejects each one. A move is one entry: accepting or rejecting
|
|
614
|
+
* it resolves both its source and its destination. Clicking an entry
|
|
615
|
+
* selects the change in the editor.
|
|
616
|
+
*/
|
|
617
|
+
declare const TrackedChangesList: React__default.FC<TrackedChangesListProps>;
|
|
618
|
+
|
|
537
619
|
interface UseFindReplaceResult extends FindReplaceSnapshot {
|
|
538
620
|
/** Whether the editor has the `FindReplace` extension. */
|
|
539
621
|
available: boolean;
|
|
@@ -575,4 +657,4 @@ interface FindReplaceBarProps {
|
|
|
575
657
|
*/
|
|
576
658
|
declare const FindReplaceBar: React__default.FC<FindReplaceBarProps>;
|
|
577
659
|
|
|
578
|
-
export { BubbleMenu, type BubbleMenuProps, CommentButton, type CommentButtonProps, CommentsPanel, type CommentsPanelProps, EditorContent, type EditorContentProps, EditorSlotsProvider, type EditorSlotsProviderProps, FindReplaceBar, type FindReplaceBarProps, type HistoryShortcutsOptions, MergePreview, type MergePreviewProps, type MergePreviewState, OutlinePanel, type OutlinePanelProps, ReviewToolbar, type ReviewToolbarProps, TemplateRenderer, type TemplateRendererProps, type UseCommentsResult, type UseDismissGuardOptions, type UseDismissGuardReturn, type UseDocumentCompareResult, type UseFileImportResult, type UseFindReplaceResult, type UseHistoryDirtyOptions, type UseHistoryDirtyResult, type UseHistoryResult, type UseMergePreviewOptions, type UseNavigationGuardOptions, type UseNavigationGuardReturn, type UsePromptEditorProps, type UseRichEditorProps, type UseTrackChangesResult, VariableForm, type VariableFormProps, useAgentToolProvider, useComments, useDismissGuard, useDocumentCompare, useEditor, useEditorSlots, useFileImport, useFindReplace, useHistory, useHistoryDirty, useHistoryShortcuts, useMergePreview, useNavigationGuard, useOutline, usePromptEditor, useTrackChanges };
|
|
660
|
+
export { BubbleMenu, type BubbleMenuProps, CommentButton, type CommentButtonProps, CommentsPanel, type CommentsPanelProps, EditorContent, type EditorContentProps, EditorSlotsProvider, type EditorSlotsProviderProps, FindReplaceBar, type FindReplaceBarProps, type HistoryShortcutsOptions, MergePreview, type MergePreviewProps, type MergePreviewState, OutlinePanel, type OutlinePanelProps, ReviewToolbar, type ReviewToolbarProps, StylesGallery, type StylesGalleryProps, TemplateRenderer, type TemplateRendererProps, TrackedChangesList, type TrackedChangesListProps, type UseCommentsResult, type UseDismissGuardOptions, type UseDismissGuardReturn, type UseDocumentCompareResult, type UseFileImportResult, type UseFindReplaceResult, type UseHistoryDirtyOptions, type UseHistoryDirtyResult, type UseHistoryResult, type UseMergePreviewOptions, type UseNavigationGuardOptions, type UseNavigationGuardReturn, type UseParagraphStylesResult, type UsePromptEditorProps, type UseRichEditorProps, type UseTrackChangesResult, VariableForm, type VariableFormProps, useAgentToolProvider, useComments, useDismissGuard, useDocumentCompare, useEditor, useEditorSlots, useFileImport, useFindReplace, useHistory, useHistoryDirty, useHistoryShortcuts, useMergePreview, useNavigationGuard, useOutline, useParagraphStyles, usePromptEditor, useTrackChanges };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as _tiptap_core from '@tiptap/core';
|
|
2
2
|
import { Editor } from '@tiptap/core';
|
|
3
|
-
import { Template, ColorGradient, FileImportOptions, RichTextPresetOptions, RichClipboardOptions, HistoryState, HistoryManager, HistoryEntry, Command, MergedExecutionOptions, HistoryMark, HistoryManagerOptions, DirtyTrackerOptions, DirtyTracker, FileImportState, FileImportController, FileImportControllerOptions, PromptValues, ParseDataSourceOptions, MergeRecordsOptions, MergeRecordsResult, MergeDataSource, MergeRecord, OutlineSnapshot, OutlineHeading, EditorSlotsMap, CommentStoreSnapshot, CommentStore, TrackChangesSnapshot, TrackedChange, ReviewAuthor, CompareSummary, CompareSource, EditorCompareOptions, FindReplaceSnapshot, FindReplaceMode, FindOptions } from '@pixerate/editor';
|
|
4
|
-
export { BindDirtyToHistoryOptions, ColorGradient, Command, CompareSource, CompareSummary, DirtyTracker, DirtyTrackerOptions, EditorCompareOptions, HistoryDirtyBinding, HistoryEntry, HistoryManager, HistoryManagerOptions, HistoryMark, HistoryState, MergeDataSource, MergeOutput, MergeRecord, MergeRecordsResult, MergedExecutionOptions, OutlineHeading, OutlineSnapshot, OutlineTreeItem, PromptDiagnostic, PromptValues, RichTextPresetOptions, Template, TemplateVersion, Token, TokenType, VariableFormField, bindDirtyToHistory, createDirtyTracker, createHistoryManager, defaultIsEqual, withoutDirty } from '@pixerate/editor';
|
|
3
|
+
import { Template, ColorGradient, FileImportOptions, RichTextPresetOptions, RichClipboardOptions, HistoryState, HistoryManager, HistoryEntry, Command, MergedExecutionOptions, HistoryMark, HistoryManagerOptions, DirtyTrackerOptions, DirtyTracker, FileImportState, ImportStructureSummary, FileImportController, FileImportControllerOptions, PromptValues, ParseDataSourceOptions, MergeRecordsOptions, MergeRecordsResult, MergeDataSource, MergeRecord, OutlineSnapshot, OutlineHeading, ParagraphStylesSnapshot, StyleRegistry, StyleDefinition, CreateStyleFromSelectionOptions, EditorSlotsMap, CommentStoreSnapshot, CommentStore, TrackChangesSnapshot, TrackedChange, ReviewAuthor, CompareSummary, CompareSource, EditorCompareOptions, FindReplaceSnapshot, FindReplaceMode, FindOptions } from '@pixerate/editor';
|
|
4
|
+
export { BindDirtyToHistoryOptions, ColorGradient, Command, CompareSource, CompareSummary, DirtyTracker, DirtyTrackerOptions, EditorCompareOptions, HistoryDirtyBinding, HistoryEntry, HistoryManager, HistoryManagerOptions, HistoryMark, HistoryState, MergeDataSource, MergeOutput, MergeRecord, MergeRecordsResult, MergedExecutionOptions, OutlineHeading, OutlineSnapshot, OutlineTreeItem, ParagraphStylesSnapshot, PromptDiagnostic, PromptValues, RichTextPresetOptions, StyleDefinition, Template, TemplateVersion, Token, TokenType, VariableFormField, bindDirtyToHistory, createDirtyTracker, createHistoryManager, defaultIsEqual, withoutDirty } from '@pixerate/editor';
|
|
5
5
|
import { UseEditorOptions, EditorContentProps as EditorContentProps$1 } from '@tiptap/react';
|
|
6
6
|
import { HistoryManager as HistoryManager$1 } from '@pixerate/editor/history';
|
|
7
7
|
import { ToolRegistry, AgentToolProvider } from '@pixerate/editor/agent';
|
|
8
8
|
import React__default from 'react';
|
|
9
9
|
import { BubbleMenuPluginProps } from '@tiptap/extension-bubble-menu';
|
|
10
|
-
export { FormulaHints, FormulaHintsProps, SpreadsheetContextMenu, SpreadsheetContextMenuProps, SpreadsheetEditor, SpreadsheetEditorProps, SpreadsheetGroupRow, SpreadsheetGroupRowProps, useFillHandle, useSpreadsheetClipboard, useSpreadsheetEditor } from './spreadsheet/index.js';
|
|
11
|
-
export { AdjustmentLayersPanel, AdjustmentLayersPanelProps, ControlSlider, ControlSliderProps, CurvesEditor, CurvesEditorProps, Histogram, HistogramProps, ImageEditor, ImageEditorProps, UseImageEditorReturn, useImageEditor, useImageHistogram } from './image-editor/index.js';
|
|
10
|
+
export { FormulaHints, FormulaHintsProps, NameManager, NameManagerProps, SheetTabs, SheetTabsProps, SpreadsheetConditionalFormatPanel, SpreadsheetContextMenu, SpreadsheetContextMenuProps, SpreadsheetDataValidationPanel, SpreadsheetEditor, SpreadsheetEditorProps, SpreadsheetGroupRow, SpreadsheetGroupRowProps, SpreadsheetRulePanelProps, SpreadsheetValidationDialog, SpreadsheetValidationDialogProps, useFillHandle, useSpreadsheetClipboard, useSpreadsheetEditor } from './spreadsheet/index.js';
|
|
11
|
+
export { AdjustmentLayersPanel, AdjustmentLayersPanelProps, ControlSlider, ControlSliderProps, CurvesEditor, CurvesEditorProps, Histogram, HistogramProps, ImageEditor, ImageEditorProps, RefineEdgePanel, RefineEdgePanelProps, SelectionOptionsBar, SelectionOptionsBarProps, UseImageEditorReturn, useImageEditor, useImageHistogram } from './image-editor/index.js';
|
|
12
12
|
export { CommandPalette, CommandPaletteProps, UseCommandPaletteOptions, UseCommandPaletteResult, UseCommandShortcutsOptions, useCommandPalette, useCommandShortcuts, useRegisterCommands } from './commands/index.js';
|
|
13
13
|
export { RecoveryPrompt, RecoveryPromptProps, UseAutosaveOptions, UseAutosaveResult, useAutosave } from './persistence/index.js';
|
|
14
|
-
export { GenerationSettings, GenerationSettingsProps, JobProgress, JobProgressProps, UseJobProgressOptions, useGenerationPlan, useJobProgress } from './generation/index.js';
|
|
14
|
+
export { AssetMentionChips, AssetMentionChipsProps, GenerationHistory, GenerationHistoryProps, GenerationSettings, GenerationSettingsProps, JobProgress, JobProgressProps, UseGenerationRecordsResult, UseJobProgressOptions, useGenerationPlan, useGenerationRecords, useJobProgress } from './generation/index.js';
|
|
15
15
|
import '@pixerate/editor/spreadsheet';
|
|
16
16
|
import '@pixerate/editor/image-editor';
|
|
17
17
|
import '@pixerate/editor/commands';
|
|
@@ -225,6 +225,13 @@ interface HistoryShortcutsOptions {
|
|
|
225
225
|
declare function useHistoryShortcuts(manager: HistoryManager$1, options?: HistoryShortcutsOptions): void;
|
|
226
226
|
|
|
227
227
|
interface UseFileImportResult extends FileImportState {
|
|
228
|
+
/**
|
|
229
|
+
* Structures detected in the last import (headings, lists, tables, columns),
|
|
230
|
+
* or `null` when no adapter reported any (only structure-aware adapters such
|
|
231
|
+
* as PDF do). Turn PDF detection off with
|
|
232
|
+
* `useFileImport(editor, { adapterOptions: { pdf: { structure: false } } })`.
|
|
233
|
+
*/
|
|
234
|
+
structureSummary: ImportStructureSummary | null;
|
|
228
235
|
/** Value for `<input type="file" accept={…}>`. */
|
|
229
236
|
accept: string;
|
|
230
237
|
/** Opens the browser file picker and imports the chosen files at the selection. */
|
|
@@ -429,6 +436,58 @@ interface OutlinePanelProps {
|
|
|
429
436
|
*/
|
|
430
437
|
declare const OutlinePanel: React__default.FC<OutlinePanelProps>;
|
|
431
438
|
|
|
439
|
+
interface UseParagraphStylesResult extends ParagraphStylesSnapshot {
|
|
440
|
+
registry: StyleRegistry | null;
|
|
441
|
+
/** The style of the block at the selection. */
|
|
442
|
+
currentStyle: StyleDefinition | null;
|
|
443
|
+
/** Applies a paragraph style to the selected blocks. */
|
|
444
|
+
apply: (id: string) => boolean;
|
|
445
|
+
/** Resets the selected blocks to Normal. */
|
|
446
|
+
clear: () => boolean;
|
|
447
|
+
/** Updates a style (default: the current one) to the formatting at the selection. */
|
|
448
|
+
updateFromSelection: (id?: string) => boolean;
|
|
449
|
+
/** Creates (and applies) a style from the formatting at the selection; returns its id. */
|
|
450
|
+
createFromSelection: (name: string, options?: CreateStyleFromSelectionOptions) => string | null;
|
|
451
|
+
/** Applies a character style to the selection. */
|
|
452
|
+
applyCharacterStyle: (id: string) => boolean;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Subscribes to an editor's paragraph styles (`ParagraphStyles` extension):
|
|
456
|
+
* the gallery, all styles and the style at the selection, with commands.
|
|
457
|
+
* Re-renders only when the styles or the current style change.
|
|
458
|
+
*/
|
|
459
|
+
declare function useParagraphStyles(editor: Editor | null | undefined): UseParagraphStylesResult;
|
|
460
|
+
|
|
461
|
+
interface StylesGalleryProps {
|
|
462
|
+
editor: Editor | null;
|
|
463
|
+
/**
|
|
464
|
+
* `dropdown` (default): a button showing the current style that opens the
|
|
465
|
+
* list. `gallery`: the styles are always shown, in a row.
|
|
466
|
+
*/
|
|
467
|
+
variant?: "dropdown" | "gallery";
|
|
468
|
+
/** List every available paragraph style instead of the gallery (quick) styles. */
|
|
469
|
+
showAllStyles?: boolean;
|
|
470
|
+
/** Show the "Update to match selection" and "New style from selection" actions. Defaults to `true`. */
|
|
471
|
+
showActions?: boolean;
|
|
472
|
+
/** Preview each style's font, weight, style and color in its entry. Defaults to `true`. */
|
|
473
|
+
preview?: boolean;
|
|
474
|
+
className?: string;
|
|
475
|
+
itemClassName?: string;
|
|
476
|
+
activeItemClassName?: string;
|
|
477
|
+
/** Called after a style is applied, updated or created. */
|
|
478
|
+
onChange?: (event: {
|
|
479
|
+
type: "apply" | "update" | "create";
|
|
480
|
+
id: string;
|
|
481
|
+
}) => void;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Paragraph styles picker (Word's Styles gallery): shows the style at the
|
|
485
|
+
* selection, applies a style on click, updates the current style to match
|
|
486
|
+
* the selection and creates a new style from the selection. Needs the
|
|
487
|
+
* `ParagraphStyles` extension (`richTextOptions: { paragraphStyles: true }`).
|
|
488
|
+
*/
|
|
489
|
+
declare const StylesGallery: React__default.FC<StylesGalleryProps>;
|
|
490
|
+
|
|
432
491
|
interface EditorSlotsProviderProps {
|
|
433
492
|
slots?: Partial<EditorSlotsMap>;
|
|
434
493
|
children: React__default.ReactNode;
|
|
@@ -460,6 +519,12 @@ interface UseTrackChangesResult extends TrackChangesSnapshot {
|
|
|
460
519
|
rejectAll: () => void;
|
|
461
520
|
next: () => void;
|
|
462
521
|
previous: () => void;
|
|
522
|
+
/** Selects a change in the editor. */
|
|
523
|
+
select: (id: string) => void;
|
|
524
|
+
/** Accepts a tracked move (both ends). */
|
|
525
|
+
acceptMove: (id: string) => void;
|
|
526
|
+
/** Rejects a tracked move (both ends). */
|
|
527
|
+
rejectMove: (id: string) => void;
|
|
463
528
|
}
|
|
464
529
|
/**
|
|
465
530
|
* Subscribes to the tracked-change state of an editor using the
|
|
@@ -534,6 +599,23 @@ interface UseDocumentCompareResult {
|
|
|
534
599
|
*/
|
|
535
600
|
declare function useDocumentCompare(editor: Editor | null | undefined, options?: EditorCompareOptions): UseDocumentCompareResult;
|
|
536
601
|
|
|
602
|
+
interface TrackedChangesListProps {
|
|
603
|
+
editor: Editor | null;
|
|
604
|
+
className?: string;
|
|
605
|
+
itemClassName?: string;
|
|
606
|
+
activeItemClassName?: string;
|
|
607
|
+
/** Content shown when there are no changes. */
|
|
608
|
+
emptyState?: React__default.ReactNode;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Lists the document's tracked changes (insertions, deletions, moves,
|
|
612
|
+
* formatting and block changes) with their author and description, and
|
|
613
|
+
* accepts or rejects each one. A move is one entry: accepting or rejecting
|
|
614
|
+
* it resolves both its source and its destination. Clicking an entry
|
|
615
|
+
* selects the change in the editor.
|
|
616
|
+
*/
|
|
617
|
+
declare const TrackedChangesList: React__default.FC<TrackedChangesListProps>;
|
|
618
|
+
|
|
537
619
|
interface UseFindReplaceResult extends FindReplaceSnapshot {
|
|
538
620
|
/** Whether the editor has the `FindReplace` extension. */
|
|
539
621
|
available: boolean;
|
|
@@ -575,4 +657,4 @@ interface FindReplaceBarProps {
|
|
|
575
657
|
*/
|
|
576
658
|
declare const FindReplaceBar: React__default.FC<FindReplaceBarProps>;
|
|
577
659
|
|
|
578
|
-
export { BubbleMenu, type BubbleMenuProps, CommentButton, type CommentButtonProps, CommentsPanel, type CommentsPanelProps, EditorContent, type EditorContentProps, EditorSlotsProvider, type EditorSlotsProviderProps, FindReplaceBar, type FindReplaceBarProps, type HistoryShortcutsOptions, MergePreview, type MergePreviewProps, type MergePreviewState, OutlinePanel, type OutlinePanelProps, ReviewToolbar, type ReviewToolbarProps, TemplateRenderer, type TemplateRendererProps, type UseCommentsResult, type UseDismissGuardOptions, type UseDismissGuardReturn, type UseDocumentCompareResult, type UseFileImportResult, type UseFindReplaceResult, type UseHistoryDirtyOptions, type UseHistoryDirtyResult, type UseHistoryResult, type UseMergePreviewOptions, type UseNavigationGuardOptions, type UseNavigationGuardReturn, type UsePromptEditorProps, type UseRichEditorProps, type UseTrackChangesResult, VariableForm, type VariableFormProps, useAgentToolProvider, useComments, useDismissGuard, useDocumentCompare, useEditor, useEditorSlots, useFileImport, useFindReplace, useHistory, useHistoryDirty, useHistoryShortcuts, useMergePreview, useNavigationGuard, useOutline, usePromptEditor, useTrackChanges };
|
|
660
|
+
export { BubbleMenu, type BubbleMenuProps, CommentButton, type CommentButtonProps, CommentsPanel, type CommentsPanelProps, EditorContent, type EditorContentProps, EditorSlotsProvider, type EditorSlotsProviderProps, FindReplaceBar, type FindReplaceBarProps, type HistoryShortcutsOptions, MergePreview, type MergePreviewProps, type MergePreviewState, OutlinePanel, type OutlinePanelProps, ReviewToolbar, type ReviewToolbarProps, StylesGallery, type StylesGalleryProps, TemplateRenderer, type TemplateRendererProps, TrackedChangesList, type TrackedChangesListProps, type UseCommentsResult, type UseDismissGuardOptions, type UseDismissGuardReturn, type UseDocumentCompareResult, type UseFileImportResult, type UseFindReplaceResult, type UseHistoryDirtyOptions, type UseHistoryDirtyResult, type UseHistoryResult, type UseMergePreviewOptions, type UseNavigationGuardOptions, type UseNavigationGuardReturn, type UseParagraphStylesResult, type UsePromptEditorProps, type UseRichEditorProps, type UseTrackChangesResult, VariableForm, type VariableFormProps, useAgentToolProvider, useComments, useDismissGuard, useDocumentCompare, useEditor, useEditorSlots, useFileImport, useFindReplace, useHistory, useHistoryDirty, useHistoryShortcuts, useMergePreview, useNavigationGuard, useOutline, useParagraphStyles, usePromptEditor, useTrackChanges };
|