Skip to content

Commit

Permalink
feat: bump is-hotkey and direction to 0.2.0 and 2.0.1, add dependenci…
Browse files Browse the repository at this point in the history
…es of package.json
  • Loading branch information
why520crazy committed Sep 13, 2023
1 parent d2045d7 commit 193eaf6
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 17 deletions.
36 changes: 26 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"@angular/platform-browser-dynamic": "~16.2.1",
"@angular/router": "^16.2.1",
"core-js": "3.28.0",
"direction": "^1.0.3",
"is-hotkey": "^0.1.6",
"direction": "^2.0.1",
"is-hotkey": "^0.2.0",
"rxjs": "~6.6.0",
"slate": "0.72.8",
"slate-history": "0.66.0",
Expand Down Expand Up @@ -96,4 +96,4 @@
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.0"
}
}
}
9 changes: 7 additions & 2 deletions packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@
"slate": ">= 0.63.0",
"slate-history": "^0.66.0",
"debug": "^4.1.1",
"direction": "^1.0.3",
"is-hotkey": "^0.1.6",
"direction": ">= 1.0.3",
"is-hotkey": "^0.2.0",
"scroll-into-view-if-needed": "^2.2.20"
},
"dependencies": {
"slate": "^0.72.8",
"slate-history": "^0.66.0",
"direction": "^2.0.1",
"is-hotkey": "^0.2.0",
"scroll-into-view-if-needed": "^2.2.20",
"tslib": "^2.5.0"
},
"exports": {
Expand Down
4 changes: 2 additions & 2 deletions packages/src/components/editable/editable.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
EDITOR_TO_WINDOW
} from '../../utils/weak-maps';
import { Text as SlateText, Element, Transforms, Editor, Range, Path, NodeEntry, Node } from 'slate';
import getDirection from 'direction';
import { direction } from 'direction';
import scrollIntoView from 'scroll-into-view-if-needed';
import { AngularEditor } from '../../plugins/angular-editor';
import {
Expand Down Expand Up @@ -981,7 +981,7 @@ export class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewChe
const { selection } = editor;

const element = editor.children[selection !== null ? selection.focus.path[0] : 0];
const isRTL = getDirection(Node.string(element)) === 'rtl';
const isRTL = direction(Node.string(element)) === 'rtl';

try {
// COMPAT: Since we prevent the default behavior on
Expand Down

0 comments on commit 193eaf6

Please sign in to comment.