@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.
Files changed (50) hide show
  1. package/THIRD-PARTY-LICENSES.txt +83 -83
  2. package/dist/docx-import.d.ts +11 -11
  3. package/dist/editor.d.ts +109 -159
  4. package/dist/fallback.d.ts +7 -8
  5. package/dist/i18n.d.ts +15 -26
  6. package/dist/import-formats.d.ts +19 -17
  7. package/dist/index.d.ts +4 -4
  8. package/dist/kodaeditor-core.umd.cjs +1 -1
  9. package/dist/kodaeditor.js +1 -1
  10. package/dist/kodaeditor.umd.cjs +1 -1
  11. package/dist/license.d.ts +46 -50
  12. package/dist/schema.d.ts +7 -7
  13. package/dist/serialize.d.ts +11 -11
  14. package/dist/web-component.d.ts +71 -213
  15. package/package.json +2 -5
  16. package/dist/commands.d.ts +0 -15
  17. package/dist/docx-alignment.d.ts +0 -14
  18. package/dist/docx-breaks.d.ts +0 -31
  19. package/dist/docx-forms.d.ts +0 -28
  20. package/dist/docx-headers.d.ts +0 -22
  21. package/dist/docx-images.d.ts +0 -41
  22. package/dist/docx-math.d.ts +0 -18
  23. package/dist/docx-styles.d.ts +0 -53
  24. package/dist/docx-symbols.d.ts +0 -19
  25. package/dist/docx-text-styles.d.ts +0 -27
  26. package/dist/floatingToolbar.d.ts +0 -7
  27. package/dist/group-icons.d.ts +0 -17
  28. package/dist/icons.d.ts +0 -1
  29. package/dist/image-view.d.ts +0 -27
  30. package/dist/markdown.d.ts +0 -4
  31. package/dist/menubar.d.ts +0 -60
  32. package/dist/offline-license.d.ts +0 -36
  33. package/dist/pagination.d.ts +0 -11
  34. package/dist/paste.d.ts +0 -54
  35. package/dist/pdf-import-cdn.d.ts +0 -2
  36. package/dist/pdf-import.d.ts +0 -8
  37. package/dist/print.d.ts +0 -18
  38. package/dist/rtf-images.d.ts +0 -24
  39. package/dist/search.d.ts +0 -17
  40. package/dist/slashMenu.d.ts +0 -8
  41. package/dist/styles.d.ts +0 -8
  42. package/dist/table-split.d.ts +0 -26
  43. package/dist/table-view.d.ts +0 -34
  44. package/dist/tableColumnTrade.d.ts +0 -15
  45. package/dist/tableToolbar.d.ts +0 -14
  46. package/dist/toc-view.d.ts +0 -23
  47. package/dist/toolbar-editor.d.ts +0 -89
  48. package/dist/validate-signature.d.ts +0 -64
  49. package/dist/xlsx-import-cdn.d.ts +0 -1
  50. package/dist/xlsx-import.d.ts +0 -2
@@ -1,23 +1,25 @@
1
1
  /**
2
- * Импорт «лёгких» форматов БЕЗ зависимостей и БЕЗ сервера (client-side):
3
- * - CSV/TSV -> HTML-таблица (первая строка = шапка)
4
- * - txt -> абзацы
5
- * Тяжёлые форматы (pdf, xlsx) и markdown подключаются отдельными модулями.
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
- * Единая точка детекта формата по имени/MIME — detectImportFormat(). Сами
8
- * функции принимают строку и возвращают HTML; вставку делает Editor.importFile.
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
- /** Определяет формат файла по имени и MIME-типу. */
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
- * Разбирает CSV (RFC-4180-подобно): кавычки экранируют разделитель и перевод
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
- /** Матрица значений -> HTML-таблица (первая строка = заголовок th). */
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
- /** Диапазон слияния ячеек (0-based, инклюзивно), формат SheetJS `!merges`. */
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
- * Матрица значений + список слияний -> HTML-таблица с colspan/rowspan.
33
- * Схема (prosemirror-tables) уже умеет парсить colspan/rowspan из HTML —
34
- * тот же путь, которым уже работают слитые ячейки docx-таблиц, — не хватало
35
- * только генерации этих атрибутов на стороне xlsx-импорта (см. xlsx-import.ts).
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/TSV -> HTML-таблица (первая строка = заголовок). */
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
- /** Простой текст -> абзацы (пустая строка разделяет абзацы, перенос -> <br>). */
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
- * Точка входа @kodaeditor/core.
2
+ * Entry point of @kodaeditor/core.
3
3
  *
4
- * Экспортирует фреймворк-независимое ядро + регистрацию Web Component.
5
- * При импорте сразу определяет <koda-editor>, чтобы работало «из коробки»
6
- * в любом фреймворке и vanilla.
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';