@modusoperandi/licit 1.0.1 → 1.0.2

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.
@@ -6,8 +6,8 @@ import convertToJSON from './convertToJSON.js';
6
6
  import CustomEditorView from './ui/CustomEditorView.js';
7
7
  import { UICommand } from '@modusoperandi/licit-doc-attrs-step';
8
8
 
9
- const commandsRegistery = new Map<any, any>();
10
- const viewsRegistery = new Map<any, any>();
9
+ const commandsRegistery = new Map();
10
+ const viewsRegistery = new Map();
11
11
 
12
12
  // This file exports methods to help developer to debug editor from web
13
13
  // inspector. To use this, add the following lines to export the utility.
package/EditorCommands.js CHANGED
@@ -3,18 +3,15 @@ import * as ProsemirrorTables from 'prosemirror-tables';
3
3
  // import BlockquoteInsertNewLineCommand from './BlockquoteInsertNewLineCommand';
4
4
  // import BlockquoteToggleCommand from './BlockquoteToggleCommand';
5
5
  import DocLayoutCommand from './DocLayoutCommand.js';
6
- import { HeadingCommand } from '@modusoperandi/licit-ui-commands';
7
6
  import HistoryRedoCommand from './HistoryRedoCommand.js';
8
7
  import HistoryUndoCommand from './HistoryUndoCommand.js';
9
8
  import HorizontalRuleCommand from './HorizontalRuleCommand.js';
10
- import { IndentCommand } from '@modusoperandi/licit-ui-commands';
11
9
  import LinkSetURLCommand from './LinkSetURLCommand.js';
12
10
  import ListItemInsertNewLineCommand from './ListItemInsertNewLineCommand.js';
13
11
  import ListItemMergeCommand from './ListItemMergeCommand.js';
14
12
  import ListSplitCommand from './ListSplitCommand.js';
15
13
  import { ListToggleCommand } from './ListToggleCommand.js';
16
14
  import * as MarkNames from './MarkNames.js';
17
- import { MarkToggleCommand } from '@modusoperandi/licit-ui-commands';
18
15
  import MarksClearCommand from './MarksClearCommand.js';
19
16
  import MathEditCommand from './MathEditCommand.js';
20
17
  import PrintCommand from './PrintCommand.js';
@@ -22,12 +19,8 @@ import TableBackgroundColorCommand from './TableBackgroundColorCommand.js';
22
19
  import TableBorderColorCommand from './TableBorderColorCommand.js';
23
20
  import TableInsertCommand from './TableInsertCommand.js';
24
21
  import TableMergeCellsCommand from './TableMergeCellsCommand.js';
25
- import { TextAlignCommand } from '@modusoperandi/licit-ui-commands';
26
- import { TextColorCommand } from '@modusoperandi/licit-ui-commands';
27
- import { TextHighlightCommand } from '@modusoperandi/licit-ui-commands';
22
+ import { HeadingCommand, IndentCommand, MarkToggleCommand, TextAlignCommand, TextColorCommand, TextHighlightCommand, TextLineSpacingCommand } from '@modusoperandi/licit-ui-commands';
28
23
  import TextInsertTabSpaceCommand from './TextInsertTabSpaceCommand.js';
29
- import { TextLineSpacingCommand } from '@modusoperandi/licit-ui-commands';
30
- import { createGroup } from '@modusoperandi/licit-ui-commands';
31
24
  import createCommand from './createCommand.js';
32
25
  var addColumnAfter = ProsemirrorTables.addColumnAfter,
33
26
  addColumnBefore = ProsemirrorTables.addColumnBefore,
@@ -5,26 +5,15 @@ import * as ProsemirrorTables from 'prosemirror-tables';
5
5
  // import BlockquoteInsertNewLineCommand from './BlockquoteInsertNewLineCommand';
6
6
  // import BlockquoteToggleCommand from './BlockquoteToggleCommand';
7
7
  import DocLayoutCommand from './DocLayoutCommand.js';
8
- import {
9
- HeadingCommand
10
- } from '@modusoperandi/licit-ui-commands';
11
8
  import HistoryRedoCommand from './HistoryRedoCommand.js';
12
9
  import HistoryUndoCommand from './HistoryUndoCommand.js';
13
10
  import HorizontalRuleCommand from './HorizontalRuleCommand.js';
14
- import {
15
- IndentCommand
16
- } from '@modusoperandi/licit-ui-commands';
17
11
  import LinkSetURLCommand from './LinkSetURLCommand.js';
18
12
  import ListItemInsertNewLineCommand from './ListItemInsertNewLineCommand.js';
19
13
  import ListItemMergeCommand from './ListItemMergeCommand.js';
20
14
  import ListSplitCommand from './ListSplitCommand.js';
21
- import {
22
- ListToggleCommand
23
- } from './ListToggleCommand.js';
15
+ import { ListToggleCommand } from './ListToggleCommand.js';
24
16
  import * as MarkNames from './MarkNames.js';
25
- import {
26
- MarkToggleCommand
27
- } from '@modusoperandi/licit-ui-commands';
28
17
  import MarksClearCommand from './MarksClearCommand.js';
29
18
  import MathEditCommand from './MathEditCommand.js';
30
19
  import PrintCommand from './PrintCommand.js';
@@ -33,21 +22,15 @@ import TableBorderColorCommand from './TableBorderColorCommand.js';
33
22
  import TableInsertCommand from './TableInsertCommand.js';
34
23
  import TableMergeCellsCommand from './TableMergeCellsCommand.js';
35
24
  import {
36
- TextAlignCommand
37
- } from '@modusoperandi/licit-ui-commands';
38
- import {
39
- TextColorCommand
40
- } from '@modusoperandi/licit-ui-commands';
41
- import {
42
- TextHighlightCommand
25
+ HeadingCommand,
26
+ IndentCommand,
27
+ MarkToggleCommand,
28
+ TextAlignCommand,
29
+ TextColorCommand,
30
+ TextHighlightCommand,
31
+ TextLineSpacingCommand,
43
32
  } from '@modusoperandi/licit-ui-commands';
44
33
  import TextInsertTabSpaceCommand from './TextInsertTabSpaceCommand.js';
45
- import {
46
- TextLineSpacingCommand
47
- } from '@modusoperandi/licit-ui-commands';
48
- import {
49
- createGroup
50
- } from '@modusoperandi/licit-ui-commands';
51
34
  import createCommand from './createCommand.js';
52
35
 
53
36
  const {
package/EditorKeyMap.js CHANGED
@@ -1,4 +1,4 @@
1
- import Keymap from 'browserkeymap';
1
+ // import Keymap from 'browserkeymap';
2
2
  import browser from './browser.js';
3
3
  import { makeKeyMap, makeKeyMapWithCommon } from '@modusoperandi/licit-doc-attrs-step';
4
4
 
@@ -1,6 +1,6 @@
1
1
  // @flow
2
2
 
3
- import Keymap from 'browserkeymap';
3
+ // import Keymap from 'browserkeymap';
4
4
 
5
5
  import browser from './browser.js';
6
6
 
@@ -11,7 +11,7 @@ import {
11
11
 
12
12
  // https://tinyurl.com/ybwf3wex
13
13
 
14
- export function tooltip(keymap: ?Keymap): ?string {
14
+ export function tooltip(keymap: ?any): ?string {
15
15
  if (keymap) {
16
16
  let shortcut;
17
17
  if (browser.isMac()) {
@@ -28,7 +28,7 @@ export function tooltip(keymap: ?Keymap): ?string {
28
28
  return null;
29
29
  }
30
30
 
31
- export function findShortcutByKeymap(keymap: Keymap): ?string {
31
+ export function findShortcutByKeymap(keymap: any): ?string {
32
32
  if (browser.isMac()) {
33
33
  return keymap.mac;
34
34
  }
@@ -171,7 +171,7 @@ export const ALL_KEYS = [
171
171
  KEY_UNDO,
172
172
  ];
173
173
 
174
- export function findKeymapByDescription(description: string): ?Keymap {
174
+ export function findKeymapByDescription(description: string): ?any {
175
175
  const matches = ALL_KEYS.filter((keymap) => {
176
176
  return keymap.description.toUpperCase() === description.toUpperCase();
177
177
  });
@@ -11,7 +11,7 @@ export default class HTMLMutator {
11
11
 
12
12
  constructor(doc: Document) {
13
13
  this._doc = doc;
14
- this._htmls = new Map<any, any>();
14
+ this._htmls = new Map();
15
15
  }
16
16
 
17
17
  insertHTMLBefore(html: string, el: Element): HTMLMutator {
@@ -14,7 +14,7 @@ export const ATTRIBUTE_INDENT = 'data-indent';
14
14
  export const ATTRIBUTE_STYLE_LEVEL = 'data-style-level';
15
15
  export const RESERVED_STYLE_NONE = 'None';
16
16
  export const RESERVED_STYLE_NONE_NUMBERING = RESERVED_STYLE_NONE + '-@#$-';
17
- const cssVal = new Set < string > (['', '0%', '0pt', '0px']);
17
+ const cssVal = new Set(['', '0%', '0pt', '0px']);
18
18
 
19
19
  export const EMPTY_CSS_VALUE = cssVal;
20
20