@kodaeditor/core 1.0.1 → 1.0.3
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/THIRD-PARTY-LICENSES.txt +83 -83
- package/dist/docx-import.d.ts +11 -11
- package/dist/editor.d.ts +109 -159
- package/dist/fallback.d.ts +7 -8
- package/dist/i18n.d.ts +15 -26
- package/dist/import-formats.d.ts +19 -17
- package/dist/index.d.ts +4 -4
- package/dist/kodaeditor-core.umd.cjs +1 -1
- package/dist/kodaeditor.js +1 -1
- package/dist/kodaeditor.umd.cjs +1 -1
- package/dist/license.d.ts +46 -50
- package/dist/schema.d.ts +7 -7
- package/dist/serialize.d.ts +11 -11
- package/dist/web-component.d.ts +71 -213
- package/package.json +2 -5
- package/dist/commands.d.ts +0 -15
- package/dist/docx-alignment.d.ts +0 -14
- package/dist/docx-breaks.d.ts +0 -31
- package/dist/docx-forms.d.ts +0 -28
- package/dist/docx-headers.d.ts +0 -22
- package/dist/docx-images.d.ts +0 -41
- package/dist/docx-math.d.ts +0 -18
- package/dist/docx-styles.d.ts +0 -53
- package/dist/docx-symbols.d.ts +0 -19
- package/dist/docx-text-styles.d.ts +0 -27
- package/dist/floatingToolbar.d.ts +0 -7
- package/dist/group-icons.d.ts +0 -17
- package/dist/icons.d.ts +0 -1
- package/dist/image-view.d.ts +0 -27
- package/dist/markdown.d.ts +0 -4
- package/dist/menubar.d.ts +0 -60
- package/dist/offline-license.d.ts +0 -36
- package/dist/pagination.d.ts +0 -11
- package/dist/paste.d.ts +0 -54
- package/dist/pdf-import-cdn.d.ts +0 -2
- package/dist/pdf-import.d.ts +0 -8
- package/dist/print.d.ts +0 -18
- package/dist/rtf-images.d.ts +0 -24
- package/dist/search.d.ts +0 -17
- package/dist/slashMenu.d.ts +0 -8
- package/dist/styles.d.ts +0 -8
- package/dist/table-split.d.ts +0 -26
- package/dist/table-view.d.ts +0 -34
- package/dist/tableColumnTrade.d.ts +0 -15
- package/dist/tableToolbar.d.ts +0 -14
- package/dist/toc-view.d.ts +0 -23
- package/dist/toolbar-editor.d.ts +0 -89
- package/dist/validate-signature.d.ts +0 -64
- package/dist/xlsx-import-cdn.d.ts +0 -1
- package/dist/xlsx-import.d.ts +0 -2
package/dist/import-formats.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* - CSV
|
|
4
|
-
* -
|
|
5
|
-
*
|
|
2
|
+
* Import of the lightweight formats, with no dependencies and no server:
|
|
3
|
+
* - CSV and TSV become an HTML table, the first row its header
|
|
4
|
+
* - plain text becomes paragraphs
|
|
5
|
+
* The heavier formats (PDF, xlsx) and Markdown live in their own modules.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* detectImportFormat() is the single place where the format is decided from
|
|
8
|
+
* the file name and MIME type. The functions here take a string and return
|
|
9
|
+
* HTML; inserting it is Editor.importFile's job.
|
|
9
10
|
*/
|
|
10
11
|
export type ImportFormat = 'docx' | 'pdf' | 'xlsx' | 'csv' | 'txt' | 'md' | 'html' | 'doc' | 'image' | 'unknown';
|
|
11
|
-
/**
|
|
12
|
+
/** Determines the file format from its name and MIME type. */
|
|
12
13
|
export declare function detectImportFormat(name: string, mime?: string): ImportFormat;
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* Parses CSV along the lines of RFC 4180: quotes escape the separator and
|
|
16
|
+
* line breaks, and "" inside quotes is a literal quote. Returns a matrix of
|
|
17
|
+
* strings.
|
|
16
18
|
*/
|
|
17
19
|
export declare function parseCsv(text: string, delimiter?: string): string[][];
|
|
18
|
-
/**
|
|
20
|
+
/** Turns a matrix of values into an HTML table, the first row its header. */
|
|
19
21
|
export declare function rowsToTableHtml(rows: unknown[][]): string;
|
|
20
|
-
/**
|
|
22
|
+
/** A merged cell range, zero-based and inclusive, in the SheetJS `!merges` shape. */
|
|
21
23
|
export interface CellMergeRange {
|
|
22
24
|
s: {
|
|
23
25
|
r: number;
|
|
@@ -29,13 +31,13 @@ export interface CellMergeRange {
|
|
|
29
31
|
};
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
34
|
+
* Turns a matrix of values plus a list of merges into an HTML table with
|
|
35
|
+
* colspan and rowspan. The schema already parses those attributes, which is
|
|
36
|
+
* how merged cells from Word tables survive; this generates them for
|
|
37
|
+
* spreadsheet import.
|
|
36
38
|
*/
|
|
37
39
|
export declare function rowsToTableHtmlWithMerges(rows: unknown[][], merges: CellMergeRange[]): string;
|
|
38
|
-
/** CSV
|
|
40
|
+
/** Turns CSV or TSV into an HTML table, the first row its header. */
|
|
39
41
|
export declare function csvToTableHtml(text: string, delimiter?: string): string;
|
|
40
|
-
/**
|
|
42
|
+
/** Turns plain text into paragraphs: a blank line separates them, a single break becomes <br>. */
|
|
41
43
|
export declare function plainTextToHtml(text: string): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Entry point of @kodaeditor/core.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Exports the framework-independent core plus the web component registration.
|
|
5
|
+
* Importing this module defines <koda-editor> straight away, so the editor
|
|
6
|
+
* works out of the box in any framework and in plain HTML.
|
|
7
7
|
*/
|
|
8
8
|
export { Editor, type EditorOptions } from './editor';
|
|
9
9
|
export { importDocxToHtml, type DocxImportResult, DocxImportError, classifyDocxError, rawTextToHtml, type DocxImportErrorCode, } from './docx-import';
|