@eddyter/core 1.0.4-beta.0 → 1.0.4-beta.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/dist/editor.cjs +1 -1
- package/dist/editor.iife.js +1 -1
- package/dist/editor.mjs +4 -2
- package/dist/main.d.ts +1 -1
- package/dist/types.d.ts +16 -0
- package/package.json +1 -1
package/dist/editor.mjs
CHANGED
|
@@ -252496,6 +252496,8 @@ function l5t(e) {
|
|
|
252496
252496
|
};
|
|
252497
252497
|
r.render(/* @__PURE__ */ (0, o5t.jsx)(bHt, {
|
|
252498
252498
|
currentUser: l,
|
|
252499
|
+
nativeAppId: c.nativeAppId,
|
|
252500
|
+
clientType: c.clientType,
|
|
252499
252501
|
children: /* @__PURE__ */ (0, o5t.jsx)(i5t, {
|
|
252500
252502
|
apiKey: c.apiKey,
|
|
252501
252503
|
customVerifyKey: c.customVerifyKey,
|
|
@@ -252514,12 +252516,12 @@ function l5t(e) {
|
|
|
252514
252516
|
containerClassName: n,
|
|
252515
252517
|
contentClassName: a,
|
|
252516
252518
|
floatingToolbarClassName: o,
|
|
252517
|
-
style: c.style,
|
|
252518
252519
|
editor: c.editor,
|
|
252519
252520
|
toolbar: c.toolbar,
|
|
252520
252521
|
defaultFontFamilies: c.defaultFontFamilies,
|
|
252521
252522
|
mentionUserList: c.mentionUserList,
|
|
252522
|
-
enableReactNativeBridge: c.enableReactNativeBridge
|
|
252523
|
+
enableReactNativeBridge: c.enableReactNativeBridge,
|
|
252524
|
+
onExportFile: c.onExportFile
|
|
252523
252525
|
})
|
|
252524
252526
|
}));
|
|
252525
252527
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { EddyterInitOptions, EddyterInstance } from "./types";
|
|
2
|
-
export type { EddyterApiResponse, EddyterCurrentUser, EddyterToolbarConfig, EddyterEditorOptions, EddyterInitOptions, EddyterInstance, EddyterUpdatableOptions, } from "./types";
|
|
2
|
+
export type { EddyterApiResponse, EddyterCurrentUser, EddyterToolbarConfig, EddyterEditorOptions, EddyterInitOptions, EddyterInstance, EddyterUpdatableOptions, EddyterExportFile } from "./types";
|
|
3
3
|
export declare function init(options: EddyterInitOptions): EddyterInstance;
|
package/dist/types.d.ts
CHANGED
|
@@ -18,10 +18,25 @@ export interface EddyterToolbarConfig {
|
|
|
18
18
|
export interface EddyterEditorOptions {
|
|
19
19
|
maxHeight?: string | number;
|
|
20
20
|
}
|
|
21
|
+
export type EddyterExportFile = {
|
|
22
|
+
fileName: string;
|
|
23
|
+
mimeType: string;
|
|
24
|
+
base64: string;
|
|
25
|
+
};
|
|
21
26
|
export interface EddyterInitOptions {
|
|
22
27
|
container: string | HTMLElement;
|
|
23
28
|
apiKey: string;
|
|
24
29
|
customVerifyKey?: (apiKey: string) => Promise<EddyterApiResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Client kind for license binding. Set to "react-native" by the RN wrapper so
|
|
32
|
+
* the backend binds the key to the native app id instead of a web origin.
|
|
33
|
+
*/
|
|
34
|
+
clientType?: "web" | "react-native";
|
|
35
|
+
/**
|
|
36
|
+
* Native app identifier (iOS bundle id / Android package name). Sent to the
|
|
37
|
+
* backend as `X-Eddyter-App-Id` for React Native license binding.
|
|
38
|
+
*/
|
|
39
|
+
nativeAppId?: string;
|
|
25
40
|
user?: EddyterCurrentUser;
|
|
26
41
|
initialContent?: string;
|
|
27
42
|
onChange?: (html: string) => void;
|
|
@@ -48,6 +63,7 @@ export interface EddyterInitOptions {
|
|
|
48
63
|
defaultFontFamilies?: string[];
|
|
49
64
|
mentionUserList?: string[];
|
|
50
65
|
enableReactNativeBridge?: boolean;
|
|
66
|
+
onExportFile?: (file: EddyterExportFile) => void;
|
|
51
67
|
}
|
|
52
68
|
export type EddyterUpdatableOptions = Partial<Pick<EddyterInitOptions, "mode" | "darkMode" | "class" | "containerClass" | "contentClass" | "floatingToolbarClass" | "style" | "toolbar" | "editor" | "defaultFontFamilies" | "mentionUserList" | "enableReactNativeBridge">>;
|
|
53
69
|
export interface EddyterInstance {
|