@atlaskit/editor-plugin-code-block-advanced 8.0.10 → 8.0.12
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/CHANGELOG.md +14 -0
- package/dist/types/nodeviews/codeBlockAdvanced.d.ts +3 -3
- package/dist/types/nodeviews/codemirrorSync/syncCMWithPM.d.ts +2 -2
- package/dist/types/nodeviews/extensions/firstCodeBlockInDocument.d.ts +1 -1
- package/dist/types/nodeviews/extensions/foldGutter.d.ts +1 -1
- package/dist/types/nodeviews/extensions/keymap/backspace.d.ts +2 -2
- package/dist/types/nodeviews/extensions/keymap/index.d.ts +3 -3
- package/dist/types/nodeviews/extensions/keymap/maybeEscape.d.ts +2 -2
- package/dist/types/nodeviews/extensions/lineSeparator.d.ts +1 -1
- package/dist/types/nodeviews/extensions/manageSelectionMarker.d.ts +2 -2
- package/dist/types/nodeviews/extensions/prosemirrorDecorations.d.ts +3 -2
- package/dist/types/nodeviews/extensions/tripleClickExtension.d.ts +1 -1
- package/dist/types/nodeviews/languages/loader.d.ts +1 -1
- package/dist/types/nodeviews/lazyCodeBlockAdvanced.d.ts +2 -2
- package/dist/types/ui/syntaxHighlightingTheme.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/codeBlockAdvanced.d.ts +3 -3
- package/dist/types-ts4.5/nodeviews/codemirrorSync/syncCMWithPM.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/extensions/firstCodeBlockInDocument.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/extensions/foldGutter.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/extensions/keymap/backspace.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/extensions/keymap/index.d.ts +3 -3
- package/dist/types-ts4.5/nodeviews/extensions/keymap/maybeEscape.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/extensions/lineSeparator.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/extensions/manageSelectionMarker.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/extensions/prosemirrorDecorations.d.ts +3 -2
- package/dist/types-ts4.5/nodeviews/extensions/tripleClickExtension.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/languages/loader.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/lazyCodeBlockAdvanced.d.ts +2 -2
- package/dist/types-ts4.5/ui/syntaxHighlightingTheme.d.ts +2 -1
- package/package.json +4 -4
- package/src/nodeviews/codeBlockAdvanced.ts +7 -11
- package/src/nodeviews/codemirrorSync/syncCMWithPM.ts +2 -2
- package/src/nodeviews/extensions/firstCodeBlockInDocument.ts +1 -1
- package/src/nodeviews/extensions/foldGutter.ts +3 -6
- package/src/nodeviews/extensions/keymap/backspace.ts +2 -2
- package/src/nodeviews/extensions/keymap/index.ts +5 -4
- package/src/nodeviews/extensions/keymap/maybeEscape.ts +2 -2
- package/src/nodeviews/extensions/lineSeparator.ts +2 -1
- package/src/nodeviews/extensions/manageSelectionMarker.ts +2 -2
- package/src/nodeviews/extensions/prosemirrorDecorations.ts +3 -9
- package/src/nodeviews/extensions/tripleClickExtension.ts +2 -1
- package/src/nodeviews/languages/loader.ts +2 -1
- package/src/nodeviews/lazyCodeBlockAdvanced.ts +3 -2
- package/src/ui/syntaxHighlightingTheme.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block-advanced
|
|
2
2
|
|
|
3
|
+
## 8.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`86fd5ef0f1d07`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/86fd5ef0f1d07) -
|
|
8
|
+
Mechanical type-import autofix for text formatting editor plugins.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 8.0.11
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 8.0.10
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
|
+
import type { ViewUpdate } from '@codemirror/view';
|
|
3
3
|
import type { IntlShape } from 'react-intl-next';
|
|
4
4
|
import type { getPosHandler, getPosHandlerNode, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
-
import {
|
|
5
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { Decoration, DecorationSource, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { CodeBlockAdvancedPlugin } from '../codeBlockAdvancedPluginType';
|
|
8
8
|
export interface ConfigProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ViewUpdate } from '@codemirror/view';
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
interface Props {
|
|
4
4
|
offset: number;
|
|
5
5
|
update: ViewUpdate;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
2
|
/**
|
|
3
3
|
* Keeps 'first-node-in-document' class if it was added to a codeBlock by
|
|
4
4
|
* platform/packages/editor/editor-plugin-block-controls/src/pm-plugins/first-node-dec-plugin.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension, StateEffect } from '@codemirror/state';
|
|
2
2
|
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
export declare function foldGutterExtension({ selectNode, getNode, }: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
2
|
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import {
|
|
4
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
interface BackspaceProps {
|
|
6
6
|
cm: CodeMirror;
|
|
7
7
|
getNode: () => PMNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
|
+
import type { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import {
|
|
5
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
interface KeymapProps {
|
|
7
7
|
customFindReplace: boolean;
|
|
8
8
|
getNode: () => PMNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
2
|
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import {
|
|
5
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
interface MaybeEscapeProps {
|
|
7
7
|
cm: CodeMirror;
|
|
8
8
|
dir: -1 | 1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { CodeBlockAdvancedPlugin } from '../../codeBlockAdvancedPluginType';
|
|
4
4
|
/**
|
|
5
5
|
* Hides selection marker decoration when focused on codemirror editor and re-enables on blur
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ViewPlugin
|
|
1
|
+
import type { Facet } from '@codemirror/state';
|
|
2
|
+
import { ViewPlugin } from '@codemirror/view';
|
|
3
|
+
import type { EditorView as CodeMirror, DecorationSet, ViewUpdate } from '@codemirror/view';
|
|
3
4
|
import type { EditorView, DecorationSource } from '@atlaskit/editor-prosemirror/view';
|
|
4
5
|
/**
|
|
5
6
|
* Creates CodeMirror versions of the decorations provided by ProseMirror.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
2
|
/**
|
|
3
3
|
* To have consistent behaviour with previous code block when a triple click occurs in the editor
|
|
4
4
|
* we should select the entire code block rather than the line.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
|
-
import {
|
|
3
|
+
import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { CodeBlockAdvancedPlugin } from '../codeBlockAdvancedPluginType';
|
|
6
6
|
interface Props {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { HighlightStyle
|
|
1
|
+
import { HighlightStyle } from '@codemirror/language';
|
|
2
|
+
import type { Language } from '@codemirror/language';
|
|
2
3
|
export declare const highlightStyle: HighlightStyle;
|
|
3
4
|
/**
|
|
4
5
|
* Prismjs (renderer) and codemirror (editor) tokenise slightly differently,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
|
+
import type { ViewUpdate } from '@codemirror/view';
|
|
3
3
|
import type { IntlShape } from 'react-intl-next';
|
|
4
4
|
import type { getPosHandler, getPosHandlerNode, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
-
import {
|
|
5
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { Decoration, DecorationSource, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { CodeBlockAdvancedPlugin } from '../codeBlockAdvancedPluginType';
|
|
8
8
|
export interface ConfigProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ViewUpdate } from '@codemirror/view';
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
interface Props {
|
|
4
4
|
offset: number;
|
|
5
5
|
update: ViewUpdate;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
2
|
/**
|
|
3
3
|
* Keeps 'first-node-in-document' class if it was added to a codeBlock by
|
|
4
4
|
* platform/packages/editor/editor-plugin-block-controls/src/pm-plugins/first-node-dec-plugin.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension, StateEffect } from '@codemirror/state';
|
|
2
2
|
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
export declare function foldGutterExtension({ selectNode, getNode, }: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
2
|
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import {
|
|
4
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
interface BackspaceProps {
|
|
6
6
|
cm: CodeMirror;
|
|
7
7
|
getNode: () => PMNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
|
+
import type { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import {
|
|
5
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
interface KeymapProps {
|
|
7
7
|
customFindReplace: boolean;
|
|
8
8
|
getNode: () => PMNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
2
|
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import {
|
|
5
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
interface MaybeEscapeProps {
|
|
7
7
|
cm: CodeMirror;
|
|
8
8
|
dir: -1 | 1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { CodeBlockAdvancedPlugin } from '../../codeBlockAdvancedPluginType';
|
|
4
4
|
/**
|
|
5
5
|
* Hides selection marker decoration when focused on codemirror editor and re-enables on blur
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ViewPlugin
|
|
1
|
+
import type { Facet } from '@codemirror/state';
|
|
2
|
+
import { ViewPlugin } from '@codemirror/view';
|
|
3
|
+
import type { EditorView as CodeMirror, DecorationSet, ViewUpdate } from '@codemirror/view';
|
|
3
4
|
import type { EditorView, DecorationSource } from '@atlaskit/editor-prosemirror/view';
|
|
4
5
|
/**
|
|
5
6
|
* Creates CodeMirror versions of the decorations provided by ProseMirror.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
2
|
/**
|
|
3
3
|
* To have consistent behaviour with previous code block when a triple click occurs in the editor
|
|
4
4
|
* we should select the entire code block rather than the line.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
|
-
import {
|
|
3
|
+
import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { CodeBlockAdvancedPlugin } from '../codeBlockAdvancedPluginType';
|
|
6
6
|
interface Props {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { HighlightStyle
|
|
1
|
+
import { HighlightStyle } from '@codemirror/language';
|
|
2
|
+
import type { Language } from '@codemirror/language';
|
|
2
3
|
export declare const highlightStyle: HighlightStyle;
|
|
3
4
|
/**
|
|
4
5
|
* Prismjs (renderer) and codemirror (editor) tokenise slightly differently,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block-advanced",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.12",
|
|
4
4
|
"description": "CodeBlockAdvanced plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
42
|
-
"@atlaskit/tokens": "^11.
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^46.0.0",
|
|
42
|
+
"@atlaskit/tokens": "^11.2.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@codemirror/autocomplete": "6.18.4",
|
|
45
45
|
"@codemirror/commands": "6.7.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"codemirror-lang-elixir": "4.0.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@atlaskit/editor-common": "^112.
|
|
58
|
+
"@atlaskit/editor-common": "^112.9.0",
|
|
59
59
|
"react": "^18.2.0",
|
|
60
60
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
61
61
|
},
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { closeBrackets } from '@codemirror/autocomplete';
|
|
2
2
|
import { syntaxHighlighting, bracketMatching } from '@codemirror/language';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
EditorState as CodeMirrorState,
|
|
8
|
-
type StateEffect,
|
|
9
|
-
} from '@codemirror/state';
|
|
10
|
-
import { EditorView as CodeMirror, lineNumbers, type ViewUpdate, gutters } from '@codemirror/view';
|
|
3
|
+
import { Compartment, Facet, EditorState as CodeMirrorState } from '@codemirror/state';
|
|
4
|
+
import type { Extension, StateEffect } from '@codemirror/state';
|
|
5
|
+
import { EditorView as CodeMirror, lineNumbers, gutters } from '@codemirror/view';
|
|
6
|
+
import type { ViewUpdate } from '@codemirror/view';
|
|
11
7
|
import type { IntlShape } from 'react-intl-next';
|
|
12
8
|
|
|
13
9
|
import { getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
@@ -18,7 +14,7 @@ import {
|
|
|
18
14
|
codeBlockMessages,
|
|
19
15
|
roleDescriptionMessages,
|
|
20
16
|
} from '@atlaskit/editor-common/messages';
|
|
21
|
-
import {
|
|
17
|
+
import type { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
22
18
|
import type {
|
|
23
19
|
getPosHandler,
|
|
24
20
|
getPosHandlerNode,
|
|
@@ -26,8 +22,8 @@ import type {
|
|
|
26
22
|
EditorContentMode,
|
|
27
23
|
} from '@atlaskit/editor-common/types';
|
|
28
24
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
25
|
+
import type { EditorSelectionAPI } from '@atlaskit/editor-plugin-selection';
|
|
26
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
31
27
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
32
28
|
import type {
|
|
33
29
|
Decoration,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ViewUpdate } from '@codemirror/view';
|
|
2
2
|
|
|
3
3
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import {
|
|
4
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { foldGutter, codeFolding, foldState, foldEffect } from '@codemirror/language';
|
|
2
|
-
import {
|
|
2
|
+
import type { Extension, StateEffect } from '@codemirror/state';
|
|
3
3
|
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
type FoldRange,
|
|
8
|
-
getCodeBlockFoldState,
|
|
9
|
-
} from '@atlaskit/editor-common/code-block';
|
|
5
|
+
import { setCodeBlockFoldState, getCodeBlockFoldState } from '@atlaskit/editor-common/code-block';
|
|
6
|
+
import type { FoldRange } from '@atlaskit/editor-common/code-block';
|
|
10
7
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
11
8
|
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
12
9
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
2
|
|
|
3
3
|
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import {
|
|
6
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
|
|
8
8
|
interface BackspaceProps {
|
|
9
9
|
cm: CodeMirror;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { defaultKeymap, indentWithTab } from '@codemirror/commands';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Extension } from '@codemirror/state';
|
|
3
|
+
import { keymap as cmKeymap } from '@codemirror/view';
|
|
4
|
+
import type { KeyBinding } from '@codemirror/view';
|
|
4
5
|
|
|
5
6
|
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
6
|
-
import {
|
|
7
|
+
import type { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
7
8
|
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
8
9
|
import { exitCode, selectAll } from '@atlaskit/editor-prosemirror/commands';
|
|
9
10
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
-
import {
|
|
11
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
12
|
import { undo, redo } from '@atlaskit/prosemirror-history';
|
|
12
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
2
|
|
|
3
3
|
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
4
4
|
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
import {
|
|
7
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
|
|
9
9
|
interface MaybeEscapeProps {
|
|
10
10
|
cm: CodeMirror;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EditorState as CodeMirrorState
|
|
1
|
+
import { EditorState as CodeMirrorState } from '@codemirror/state';
|
|
2
|
+
import type { Extension } from '@codemirror/state';
|
|
2
3
|
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
2
|
import { EditorView as CodeMirror } from '@codemirror/view';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
5
|
|
|
6
6
|
import type { CodeBlockAdvancedPlugin } from '../../codeBlockAdvancedPluginType';
|
|
7
7
|
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
WidgetType,
|
|
5
|
-
Decoration as CodeMirrorDecoration,
|
|
6
|
-
type EditorView as CodeMirror,
|
|
7
|
-
type DecorationSet,
|
|
8
|
-
type ViewUpdate,
|
|
9
|
-
} from '@codemirror/view';
|
|
1
|
+
import type { Facet } from '@codemirror/state';
|
|
2
|
+
import { ViewPlugin, WidgetType, Decoration as CodeMirrorDecoration } from '@codemirror/view';
|
|
3
|
+
import type { EditorView as CodeMirror, DecorationSet, ViewUpdate } from '@codemirror/view';
|
|
10
4
|
|
|
11
5
|
import type { EditorView, Decoration, DecorationSource } from '@atlaskit/editor-prosemirror/view';
|
|
12
6
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { syntaxHighlighting } from '@codemirror/language';
|
|
2
|
+
import type { LanguageSupport } from '@codemirror/language';
|
|
2
3
|
import type { Extension } from '@codemirror/state';
|
|
3
4
|
|
|
4
5
|
import { languageStyling } from '../../ui/syntaxHighlightingTheme';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Extension } from '@codemirror/state';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
3
|
|
|
4
|
-
import { withLazyLoading
|
|
4
|
+
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
5
|
+
import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
5
6
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
7
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
8
|
import type { EditorView, DecorationSource, Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { HighlightStyle
|
|
1
|
+
import { HighlightStyle } from '@codemirror/language';
|
|
2
|
+
import type { Language } from '@codemirror/language';
|
|
2
3
|
import { tags } from '@lezer/highlight';
|
|
3
4
|
|
|
4
5
|
import { token } from '@atlaskit/tokens';
|