@kodaeditor/core 1.0.4 → 1.0.6
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/docx-import.d.ts
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Generated by scripts/add-type-shims.mjs - do not edit.
|
|
2
|
+
//
|
|
3
|
+
// Declarations for libraries bundled into the build. They let type checking
|
|
4
|
+
// pass on your side without installing those libraries yourself.
|
|
5
|
+
|
|
6
|
+
declare module 'orderedmap' {
|
|
7
|
+
export default class OrderedMap<T = unknown> {
|
|
8
|
+
get(key: string): T | undefined;
|
|
9
|
+
update(key: string, value: T, newKey?: string): OrderedMap<T>;
|
|
10
|
+
remove(key: string): OrderedMap<T>;
|
|
11
|
+
addToStart(key: string, value: T): OrderedMap<T>;
|
|
12
|
+
addToEnd(key: string, value: T): OrderedMap<T>;
|
|
13
|
+
forEach(fn: (key: string, value: T) => void): void;
|
|
14
|
+
readonly size: number;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare module 'prosemirror-model' {
|
|
19
|
+
export type NodeSpec = Record<string, unknown>;
|
|
20
|
+
export type MarkSpec = Record<string, unknown>;
|
|
21
|
+
export class Schema<N extends string = string, M extends string = string> {
|
|
22
|
+
readonly nodes: Record<N, unknown>;
|
|
23
|
+
readonly marks: Record<M, unknown>;
|
|
24
|
+
}
|
|
25
|
+
export class Node {
|
|
26
|
+
readonly type: { name: string };
|
|
27
|
+
readonly attrs: Record<string, unknown>;
|
|
28
|
+
readonly childCount: number;
|
|
29
|
+
readonly textContent: string;
|
|
30
|
+
toJSON(): unknown;
|
|
31
|
+
}
|
|
32
|
+
export class Fragment {
|
|
33
|
+
readonly size: number;
|
|
34
|
+
}
|
|
35
|
+
export class DOMParser {
|
|
36
|
+
static fromSchema(schema: Schema): DOMParser;
|
|
37
|
+
parse(dom: globalThis.Node): Node;
|
|
38
|
+
}
|
|
39
|
+
export class DOMSerializer {
|
|
40
|
+
static fromSchema(schema: Schema): DOMSerializer;
|
|
41
|
+
serializeFragment(fragment: Fragment): DocumentFragment;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare module 'prosemirror-view' {
|
|
46
|
+
import type { Node } from 'prosemirror-model';
|
|
47
|
+
export class EditorView {
|
|
48
|
+
readonly dom: HTMLElement;
|
|
49
|
+
readonly state: { doc: Node; tr: unknown };
|
|
50
|
+
dispatch(tr: unknown): void;
|
|
51
|
+
focus(): void;
|
|
52
|
+
destroy(): void;
|
|
53
|
+
}
|
|
54
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="./external-shims.d.ts" />
|
|
1
2
|
/**
|
|
2
3
|
* Entry point of @kodaeditor/core.
|
|
3
4
|
*
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
* works out of the box in any framework and in plain HTML.
|
|
7
8
|
*/
|
|
8
9
|
export { Editor, type EditorOptions } from './editor';
|
|
9
|
-
export { importDocxToHtml, type DocxImportResult, DocxImportError, classifyDocxError, rawTextToHtml, type DocxImportErrorCode, } from './docx-import';
|
|
10
|
+
export { importDocxToHtml, type DocxImportResult, type PlaceholderField, DocxImportError, classifyDocxError, rawTextToHtml, type DocxImportErrorCode, } from './docx-import';
|
|
10
11
|
export { editorSchema } from './schema';
|
|
11
12
|
export { docToHTML, htmlToDoc } from './serialize';
|
|
12
13
|
export { validateLicense, validateLicenseOffline, type LicenseOptions, type OfflineLicenseOptions, type LicenseResult, type LicenseStatus, } from './license';
|