@pixerate/editor-react 0.159.0 → 0.160.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/dist/hooks/usePromptEditor.d.cts +11 -1
- package/dist/hooks/usePromptEditor.d.ts +11 -1
- package/dist/index.cjs +1920 -1869
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +195 -145
- package/dist/loading-node/LoadingIndicator.d.cts +13 -0
- package/dist/loading-node/LoadingIndicator.d.ts +13 -0
- package/dist/loading-node/index.d.cts +1 -0
- package/dist/loading-node/index.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { Template, ColorGradient, type FileImportOptions } from "@pixerate/editor";
|
|
3
|
+
import { type LoadingIndicatorProps } from "../loading-node/index.cjs";
|
|
2
4
|
export interface UsePromptEditorProps {
|
|
3
5
|
/**
|
|
4
6
|
* The editor content as plain text. Changes from the parent (e.g. clearing
|
|
@@ -53,5 +55,13 @@ export interface UsePromptEditorProps {
|
|
|
53
55
|
* plain-text paste handler, so pasted files are not imported.
|
|
54
56
|
*/
|
|
55
57
|
fileImport?: Omit<FileImportOptions, "asPlainText"> | boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Component drawn inside each `loadingNode` placeholder instead of the default SVG spinner,
|
|
60
|
+
* e.g. your design system's loader. It receives `state` (`id`, `label`). Read when a
|
|
61
|
+
* placeholder renders, so changing it does not recreate the editor.
|
|
62
|
+
*/
|
|
63
|
+
loadingIndicator?: React.ComponentType<LoadingIndicatorProps>;
|
|
64
|
+
/** Accessible label of loading placeholders, announced by screen readers (default `"Loading…"`). */
|
|
65
|
+
loadingLabel?: string;
|
|
56
66
|
}
|
|
57
|
-
export declare function usePromptEditor({ content, onContentChange, templates, templateColorMap: userColorMap, isEditing, placeholder, className, onEscape, onKeyDown, onSelectionChange, onSlashCommandMatch, clearSlashCommand, slashCommandActive, onMilestone, containerId, jsonVariables, speed, fileImport, }: UsePromptEditorProps): import("@tiptap/core").Editor | null;
|
|
67
|
+
export declare function usePromptEditor({ content, onContentChange, templates, templateColorMap: userColorMap, isEditing, placeholder, className, onEscape, onKeyDown, onSelectionChange, onSlashCommandMatch, clearSlashCommand, slashCommandActive, onMilestone, containerId, jsonVariables, speed, fileImport, loadingIndicator, loadingLabel, }: UsePromptEditorProps): import("@tiptap/core").Editor | null;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { Template, ColorGradient, type FileImportOptions } from "@pixerate/editor";
|
|
3
|
+
import { type LoadingIndicatorProps } from "../loading-node/index.js";
|
|
2
4
|
export interface UsePromptEditorProps {
|
|
3
5
|
/**
|
|
4
6
|
* The editor content as plain text. Changes from the parent (e.g. clearing
|
|
@@ -53,5 +55,13 @@ export interface UsePromptEditorProps {
|
|
|
53
55
|
* plain-text paste handler, so pasted files are not imported.
|
|
54
56
|
*/
|
|
55
57
|
fileImport?: Omit<FileImportOptions, "asPlainText"> | boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Component drawn inside each `loadingNode` placeholder instead of the default SVG spinner,
|
|
60
|
+
* e.g. your design system's loader. It receives `state` (`id`, `label`). Read when a
|
|
61
|
+
* placeholder renders, so changing it does not recreate the editor.
|
|
62
|
+
*/
|
|
63
|
+
loadingIndicator?: React.ComponentType<LoadingIndicatorProps>;
|
|
64
|
+
/** Accessible label of loading placeholders, announced by screen readers (default `"Loading…"`). */
|
|
65
|
+
loadingLabel?: string;
|
|
56
66
|
}
|
|
57
|
-
export declare function usePromptEditor({ content, onContentChange, templates, templateColorMap: userColorMap, isEditing, placeholder, className, onEscape, onKeyDown, onSelectionChange, onSlashCommandMatch, clearSlashCommand, slashCommandActive, onMilestone, containerId, jsonVariables, speed, fileImport, }: UsePromptEditorProps): import("@tiptap/core").Editor | null;
|
|
67
|
+
export declare function usePromptEditor({ content, onContentChange, templates, templateColorMap: userColorMap, isEditing, placeholder, className, onEscape, onKeyDown, onSelectionChange, onSlashCommandMatch, clearSlashCommand, slashCommandActive, onMilestone, containerId, jsonVariables, speed, fileImport, loadingIndicator, loadingLabel, }: UsePromptEditorProps): import("@tiptap/core").Editor | null;
|