@superdoc-dev/react 1.6.1-next.3 → 1.6.1-next.5
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/index.d.ts +18 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ForwardRefExoticComponent } from 'react';
|
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { RefAttributes } from 'react';
|
|
6
6
|
import { SuperDoc } from 'superdoc';
|
|
7
|
+
import { SuperDocExceptionPayload } from 'superdoc';
|
|
7
8
|
import { Transaction } from 'superdoc';
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -84,13 +85,15 @@ export declare type SuperDocConfig = SuperDocConstructorConfig;
|
|
|
84
85
|
/** SuperDoc constructor config - extracted from superdoc package */
|
|
85
86
|
declare type SuperDocConstructorConfig = ConstructorParameters<typeof SuperDoc>[0];
|
|
86
87
|
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Event passed to onContentError callback. Re-derived from the core
|
|
90
|
+
* `SuperDocConfig['onContentError']` parameter so the React wrapper
|
|
91
|
+
* cannot drift from the core contract: any widening or tightening
|
|
92
|
+
* upstream surfaces here automatically. See the core
|
|
93
|
+
* `Config.onContentError` JSDoc for the field semantics
|
|
94
|
+
* (`error: unknown`, `file: File | Blob | null | undefined`).
|
|
95
|
+
*/
|
|
96
|
+
export declare type SuperDocContentErrorEvent = Parameters<NonNullable<SuperDocConfig['onContentError']>>[0];
|
|
94
97
|
|
|
95
98
|
/**
|
|
96
99
|
* SuperDocEditor component with forwardRef - Initializes SuperDoc instance and handles cleanup.
|
|
@@ -129,12 +132,14 @@ export declare interface SuperDocEditorUpdateEvent {
|
|
|
129
132
|
sectionType?: string | null;
|
|
130
133
|
}
|
|
131
134
|
|
|
132
|
-
/**
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
/**
|
|
136
|
+
* Event passed to onException callback. Re-exports the core union so
|
|
137
|
+
* the React wrapper matches what consumers receive when SuperDoc emits
|
|
138
|
+
* an `exception` event. The union has three runtime shapes (store init,
|
|
139
|
+
* restore failure, editor lifecycle); narrow with `'stage' in event`
|
|
140
|
+
* or `'code' in event` to access shape-specific fields.
|
|
141
|
+
*/
|
|
142
|
+
export declare type SuperDocExceptionEvent = SuperDocExceptionPayload;
|
|
138
143
|
|
|
139
144
|
/** SuperDoc instance type - from superdoc package */
|
|
140
145
|
export declare type SuperDocInstance = InstanceType<typeof SuperDoc>;
|