document-model 1.0.31 → 1.0.32

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.
@@ -190,10 +190,12 @@ export type EditorContext = {
190
190
  theme: 'light' | 'dark';
191
191
  debug?: boolean;
192
192
  };
193
+ export type ActionErrorCallback = (error: unknown) => void;
193
194
  export type EditorProps<S, A extends Action, L> = {
194
195
  document: Document<S, A, L>;
195
- dispatch: (action: A | BaseAction) => void;
196
+ dispatch: (action: A | BaseAction, onErrorCallback?: ActionErrorCallback) => void;
196
197
  editorContext: EditorContext;
198
+ error?: unknown;
197
199
  };
198
200
  export type Editor<S = unknown, A extends Action = Action, L = unknown> = {
199
201
  Component: FC<EditorProps<S, A, L>>;
@@ -190,10 +190,12 @@ export type EditorContext = {
190
190
  theme: 'light' | 'dark';
191
191
  debug?: boolean;
192
192
  };
193
+ export type ActionErrorCallback = (error: unknown) => void;
193
194
  export type EditorProps<S, A extends Action, L> = {
194
195
  document: Document<S, A, L>;
195
- dispatch: (action: A | BaseAction) => void;
196
+ dispatch: (action: A | BaseAction, onErrorCallback?: ActionErrorCallback) => void;
196
197
  editorContext: EditorContext;
198
+ error?: unknown;
197
199
  };
198
200
  export type Editor<S = unknown, A extends Action = Action, L = unknown> = {
199
201
  Component: FC<EditorProps<S, A, L>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-model",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "license": "AGPL-3.0-only",
5
5
  "private": false,
6
6
  "files": [