@kodaeditor/core 1.0.5 → 1.1.0

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.
@@ -0,0 +1,2 @@
1
+ export type TextCase = 'upper' | 'lower' | 'title';
2
+ export declare function changeTextCase(text: string, mode: TextCase, locale?: string): string;
@@ -14,6 +14,8 @@ declare const ElementBase: typeof HTMLElement;
14
14
  export declare class KodaEditorElement extends ElementBase {
15
15
  static formAssociated: boolean;
16
16
  private editor?;
17
+ private pendingFonts?;
18
+ private statusEl?;
17
19
  private buttons;
18
20
  private contentEl?;
19
21
  private stringsValue;
@@ -127,6 +129,7 @@ export declare class KodaEditorElement extends ElementBase {
127
129
  * translate everything: keys you leave out keep their original text. The
128
130
  * Strings type is exported by the package, so TypeScript checks the names.
129
131
  */
132
+ set fonts(list: unknown);
130
133
  set strings(overrides: Partial<Strings>);
131
134
  get strings(): Strings;
132
135
  private collectStringOverrides;
@@ -164,6 +167,9 @@ export declare class KodaEditorElement extends ElementBase {
164
167
  setTrackChanges(on: boolean): void;
165
168
  isTrackingChanges(): boolean;
166
169
  markDeletion(): void;
170
+ changeCase(mode: 'upper' | 'lower' | 'title', locale?: string): void;
171
+ /** Exports the document tables to a real .xlsx workbook, one sheet per table. */
172
+ exportXlsx(): void;
167
173
  acceptAllChanges(): void;
168
174
  rejectAllChanges(): void;
169
175
  getChangeCount(): {
@@ -189,10 +195,16 @@ export declare class KodaEditorElement extends ElementBase {
189
195
  private appendToolbarToken;
190
196
  private appendEntry;
191
197
  private onToolbarKeydown;
198
+ private refreshStats;
192
199
  private refreshToolbar;
193
200
  private makeSelect;
194
201
  private buildStyleSelect;
202
+ private fontList;
203
+ private fontOptionsFor;
204
+ private currentFontFamily;
195
205
  private buildFontSelect;
206
+ setFontFamily(family: string): void;
207
+ private buildLineHeightSelect;
196
208
  private buildSizeSelect;
197
209
  private buildColorControl;
198
210
  private pendingColorInputs;
@@ -0,0 +1,6 @@
1
+ export interface TextStats {
2
+ words: number;
3
+ chars: number;
4
+ charsNoSpaces: number;
5
+ }
6
+ export declare function countWords(text: string): TextStats;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kodaeditor/core",
3
- "version": "1.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "WYSIWYG rich-text editor as a web component. Brings tables, lists and formatting across when users paste from Word, Excel and Google Docs. Self-hosted, framework-agnostic.",
5
5
  "keywords": [
6
6
  "wysiwyg",