@atlaskit/editor-plugin-code-block-advanced 11.0.16 → 11.0.17
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 +6 -0
- package/codeBlockAdvancedPlugin/package.json +1 -8
- package/codeBlockAdvancedPluginType/package.json +1 -8
- package/package.json +2 -2
- package/dist/types-ts4.5/codeBlockAdvancedPlugin.d.ts +0 -2
- package/dist/types-ts4.5/codeBlockAdvancedPluginType.d.ts +0 -23
- package/dist/types-ts4.5/entry-points/codeBlockAdvancedPlugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/codeBlockAdvancedPluginType.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -2
- package/dist/types-ts4.5/nodeviews/codeBlockAdvanced.d.ts +0 -71
- package/dist/types-ts4.5/nodeviews/codeBlockNodeWithToDOMFixed.d.ts +0 -6
- package/dist/types-ts4.5/nodeviews/codemirrorSync/syncCMWithPM.d.ts +0 -17
- package/dist/types-ts4.5/nodeviews/codemirrorSync/updateCMSelection.d.ts +0 -7
- package/dist/types-ts4.5/nodeviews/extensions/firstCodeBlockInDocument.d.ts +0 -10
- package/dist/types-ts4.5/nodeviews/extensions/foldGutter.d.ts +0 -11
- package/dist/types-ts4.5/nodeviews/extensions/keymap/backspace.d.ts +0 -12
- package/dist/types-ts4.5/nodeviews/extensions/keymap/index.d.ts +0 -15
- package/dist/types-ts4.5/nodeviews/extensions/keymap/maybeEscape.d.ts +0 -17
- package/dist/types-ts4.5/nodeviews/extensions/lineSeparator.d.ts +0 -6
- package/dist/types-ts4.5/nodeviews/extensions/manageSelectionMarker.d.ts +0 -11
- package/dist/types-ts4.5/nodeviews/extensions/prosemirrorDecorations.d.ts +0 -32
- package/dist/types-ts4.5/nodeviews/extensions/tripleClickExtension.d.ts +0 -8
- package/dist/types-ts4.5/nodeviews/languages/actionscript/languageSupport.d.ts +0 -10
- package/dist/types-ts4.5/nodeviews/languages/actionscript/parser.d.ts +0 -2
- package/dist/types-ts4.5/nodeviews/languages/getLanguageName.d.ts +0 -602
- package/dist/types-ts4.5/nodeviews/languages/languageMap.d.ts +0 -5
- package/dist/types-ts4.5/nodeviews/languages/loader.d.ts +0 -16
- package/dist/types-ts4.5/nodeviews/lazyCodeBlockAdvanced.d.ts +0 -13
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -13
- package/dist/types-ts4.5/pm-plugins/shiftArrowKeyWorkaround.d.ts +0 -3
- package/dist/types-ts4.5/ui/syntaxHighlightingTheme.d.ts +0 -15
- package/dist/types-ts4.5/ui/theme.d.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/codeBlockAdvancedPlugin.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/codeBlockAdvancedPlugin.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/codeBlockAdvancedPlugin.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/codeBlockAdvancedPlugin.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/codeBlockAdvancedPlugin.d.ts"
|
|
15
8
|
}
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/codeBlockAdvancedPluginType.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/codeBlockAdvancedPluginType.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/codeBlockAdvancedPluginType.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/codeBlockAdvancedPluginType.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/codeBlockAdvancedPluginType.d.ts"
|
|
15
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block-advanced",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.17",
|
|
4
4
|
"description": "CodeBlockAdvanced plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
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": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^103.0.0",
|
|
42
42
|
"@atlaskit/tokens": "^13.4.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@codemirror/autocomplete": "6.18.4",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@codemirror/state';
|
|
2
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { CodeBlockPlugin } from '@atlaskit/editor-plugin-code-block';
|
|
4
|
-
import type { ContentFormatPlugin } from '@atlaskit/editor-plugin-content-format';
|
|
5
|
-
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
6
|
-
import type { FindReplacePlugin } from '@atlaskit/editor-plugin-find-replace';
|
|
7
|
-
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
8
|
-
import type { SelectionMarkerPlugin } from '@atlaskit/editor-plugin-selection-marker';
|
|
9
|
-
export type CodeBlockAdvancedPlugin = NextEditorPlugin<'codeBlockAdvanced', {
|
|
10
|
-
dependencies: [
|
|
11
|
-
OptionalPlugin<CodeBlockPlugin>,
|
|
12
|
-
SelectionPlugin,
|
|
13
|
-
OptionalPlugin<EditorDisabledPlugin>,
|
|
14
|
-
OptionalPlugin<SelectionMarkerPlugin>,
|
|
15
|
-
OptionalPlugin<FindReplacePlugin>,
|
|
16
|
-
OptionalPlugin<ContentFormatPlugin>
|
|
17
|
-
];
|
|
18
|
-
pluginConfiguration: CodeBlockAdvancedPluginOptions | undefined;
|
|
19
|
-
}>;
|
|
20
|
-
export type CodeBlockAdvancedPluginOptions = {
|
|
21
|
-
allowCodeFolding?: boolean;
|
|
22
|
-
extensions?: Extension[];
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { codeBlockAdvancedPlugin } from '../codeBlockAdvancedPlugin';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { CodeBlockAdvancedPlugin, CodeBlockAdvancedPluginOptions, } from '../codeBlockAdvancedPluginType';
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@codemirror/state';
|
|
2
|
-
import type { ViewUpdate } from '@codemirror/view';
|
|
3
|
-
import type { IntlShape } from 'react-intl';
|
|
4
|
-
import type { getPosHandler, getPosHandlerNode, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import type { Decoration, DecorationSource, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import type { CodeBlockAdvancedPlugin } from '../codeBlockAdvancedPluginType';
|
|
8
|
-
export interface ConfigProps {
|
|
9
|
-
allowCodeFolding: boolean;
|
|
10
|
-
api: ExtractInjectionAPI<CodeBlockAdvancedPlugin> | undefined;
|
|
11
|
-
extensions: Extension[];
|
|
12
|
-
getIntl: () => IntlShape;
|
|
13
|
-
}
|
|
14
|
-
declare class CodeBlockAdvancedNodeView implements NodeView {
|
|
15
|
-
dom: Node;
|
|
16
|
-
private updating;
|
|
17
|
-
private view;
|
|
18
|
-
private lineWrappingCompartment;
|
|
19
|
-
private lineNumbersCompartment;
|
|
20
|
-
private languageCompartment;
|
|
21
|
-
private readOnlyCompartment;
|
|
22
|
-
private pmDecorationsCompartment;
|
|
23
|
-
private themeCompartment;
|
|
24
|
-
private node;
|
|
25
|
-
private getPos;
|
|
26
|
-
private cm;
|
|
27
|
-
private contentMode;
|
|
28
|
-
private selectionAPI;
|
|
29
|
-
private maybeTryingToReachNodeSelection;
|
|
30
|
-
private cleanupDisabledState;
|
|
31
|
-
private languageLoader;
|
|
32
|
-
private pmFacet;
|
|
33
|
-
private ro?;
|
|
34
|
-
private unsubscribeContentFormat;
|
|
35
|
-
private invisibleAriaDescription?;
|
|
36
|
-
private config;
|
|
37
|
-
private cleanupBorderAreaClick;
|
|
38
|
-
constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, innerDecorations: DecorationSource, config: ConfigProps);
|
|
39
|
-
destroy(): void;
|
|
40
|
-
forwardUpdate(update: ViewUpdate): void;
|
|
41
|
-
setSelection(anchor: number, head: number): void;
|
|
42
|
-
private updateReadonlyState;
|
|
43
|
-
private updateLanguage;
|
|
44
|
-
private updateAriaDescription;
|
|
45
|
-
private updateLocalIdAttribute;
|
|
46
|
-
private selectCodeBlockNode;
|
|
47
|
-
private wordWrappingEnabled;
|
|
48
|
-
private lineNumbersHidden;
|
|
49
|
-
private selectCodeBlockNodeAndFocus;
|
|
50
|
-
private getLineNumberExtensions;
|
|
51
|
-
private getLineNumberVisibilityExtensions;
|
|
52
|
-
private getLineNumbersEffects;
|
|
53
|
-
private getWordWrapEffects;
|
|
54
|
-
private restoreFoldState;
|
|
55
|
-
private applyContentModeTheme;
|
|
56
|
-
update(node: PMNode, _: readonly Decoration[], innerDecorations: DecorationSource): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Updates a facet which stores information on the prosemirror decorations
|
|
59
|
-
*
|
|
60
|
-
* This then gets translated to codemirror decorations in `prosemirrorDecorationPlugin`
|
|
61
|
-
* @param decorationSource
|
|
62
|
-
* @example
|
|
63
|
-
*/
|
|
64
|
-
private getProseMirrorDecorationEffects;
|
|
65
|
-
private clearProseMirrorDecorations;
|
|
66
|
-
private handleBorderAreaClick;
|
|
67
|
-
private isBorderAreaClick;
|
|
68
|
-
stopEvent(e: Event): boolean;
|
|
69
|
-
}
|
|
70
|
-
export declare const getCodeBlockAdvancedNodeView: (props: ConfigProps) => (node: PMNode, view: EditorView, getPos: getPosHandler, innerDecorations: DecorationSource) => CodeBlockAdvancedNodeView;
|
|
71
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ViewUpdate } from '@codemirror/view';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
interface Props {
|
|
4
|
-
offset: number;
|
|
5
|
-
update: ViewUpdate;
|
|
6
|
-
view: EditorView;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* Synchronises the CodeMirror update changes with the Prosemirror editor
|
|
11
|
-
*
|
|
12
|
-
* @param props.view EditorView - Prosemirror EditorView
|
|
13
|
-
* @param props.update ViewUpdate - CodeMirror ViewUpdate
|
|
14
|
-
* @param props.offset number - position where the code block starts in prosemirror
|
|
15
|
-
*/
|
|
16
|
-
export declare const syncCMWithPM: ({ view, update, offset }: Props) => void;
|
|
17
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@codemirror/state';
|
|
2
|
-
/**
|
|
3
|
-
* Keeps 'first-node-in-document' class if it was added to a codeBlock by
|
|
4
|
-
* platform/packages/editor/editor-plugin-block-controls/src/pm-plugins/first-node-dec-plugin.ts
|
|
5
|
-
*
|
|
6
|
-
* @param getPos
|
|
7
|
-
* @returns CodeMirror Extension
|
|
8
|
-
* @example
|
|
9
|
-
*/
|
|
10
|
-
export declare const firstCodeBlockInDocument: (getPos: () => number | undefined) => Extension;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Extension, StateEffect } from '@codemirror/state';
|
|
2
|
-
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
3
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
export declare function foldGutterExtension({ selectNode, getNode, }: {
|
|
5
|
-
getNode: () => PMNode;
|
|
6
|
-
selectNode: () => void;
|
|
7
|
-
}): Extension[];
|
|
8
|
-
export declare function getCodeBlockFoldStateEffects({ node, cm, }: {
|
|
9
|
-
cm: CodeMirror;
|
|
10
|
-
node: PMNode;
|
|
11
|
-
}): StateEffect<unknown>[] | undefined;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
|
-
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
interface BackspaceProps {
|
|
6
|
-
cm: CodeMirror;
|
|
7
|
-
getNode: () => PMNode;
|
|
8
|
-
getPos: getPosHandlerNode;
|
|
9
|
-
view: EditorView;
|
|
10
|
-
}
|
|
11
|
-
export declare const backspaceKeymap: ({ cm, view, getPos, getNode }: BackspaceProps) => boolean;
|
|
12
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@codemirror/state';
|
|
2
|
-
import type { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
3
|
-
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
interface KeymapProps {
|
|
7
|
-
customFindReplace: boolean;
|
|
8
|
-
getNode: () => PMNode;
|
|
9
|
-
getPos: getPosHandlerNode;
|
|
10
|
-
onMaybeNodeSelection: () => void;
|
|
11
|
-
selectCodeBlockNode: (relativeSelectionPos: RelativeSelectionPos | undefined) => void;
|
|
12
|
-
view: EditorView;
|
|
13
|
-
}
|
|
14
|
-
export declare const keymapExtension: ({ view, getNode, getPos, selectCodeBlockNode, onMaybeNodeSelection, customFindReplace, }: KeymapProps) => Extension;
|
|
15
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { EditorView as CodeMirror } from '@codemirror/view';
|
|
2
|
-
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
3
|
-
import type { getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
interface MaybeEscapeProps {
|
|
7
|
-
cm: CodeMirror;
|
|
8
|
-
dir: -1 | 1;
|
|
9
|
-
getNode: () => PMNode;
|
|
10
|
-
getPos: getPosHandlerNode;
|
|
11
|
-
onMaybeNodeSelection: () => void;
|
|
12
|
-
selectCodeBlockNode: (relativeSelectionPos: RelativeSelectionPos | undefined) => void;
|
|
13
|
-
unit: 'line' | 'char';
|
|
14
|
-
view: EditorView;
|
|
15
|
-
}
|
|
16
|
-
export declare const maybeEscapeKeymap: ({ unit, dir, view, cm, getPos, getNode, onMaybeNodeSelection, selectCodeBlockNode, }: MaybeEscapeProps) => boolean;
|
|
17
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@codemirror/state';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { CodeBlockAdvancedPlugin } from '../../codeBlockAdvancedPluginType';
|
|
4
|
-
/**
|
|
5
|
-
* Hides selection marker decoration when focused on codemirror editor and re-enables on blur
|
|
6
|
-
*
|
|
7
|
-
* @param api
|
|
8
|
-
* @returns CodeMirror Extension
|
|
9
|
-
* @example
|
|
10
|
-
*/
|
|
11
|
-
export declare const manageSelectionMarker: (api: ExtractInjectionAPI<CodeBlockAdvancedPlugin> | undefined) => Extension;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Facet } from '@codemirror/state';
|
|
2
|
-
import { ViewPlugin } from '@codemirror/view';
|
|
3
|
-
import type { EditorView as CodeMirror, DecorationSet, ViewUpdate } from '@codemirror/view';
|
|
4
|
-
import type { EditorView, DecorationSource } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
export declare const sortDecorationsByPositionAndSide: (a: {
|
|
6
|
-
from: number;
|
|
7
|
-
value: {
|
|
8
|
-
startSide: number;
|
|
9
|
-
};
|
|
10
|
-
}, b: {
|
|
11
|
-
from: number;
|
|
12
|
-
value: {
|
|
13
|
-
startSide: number;
|
|
14
|
-
};
|
|
15
|
-
}) => number;
|
|
16
|
-
/**
|
|
17
|
-
* Creates CodeMirror versions of the decorations provided by ProseMirror.
|
|
18
|
-
*
|
|
19
|
-
* Inline ProseMirror decorations -> Mark CodeMirror decorations
|
|
20
|
-
* Widget ProseMirror decorations -> Widget CodeMirror decorations
|
|
21
|
-
*
|
|
22
|
-
* This way any decorations applied in ProseMirror land should automatically be supported
|
|
23
|
-
* by the CodeMirror editor
|
|
24
|
-
*
|
|
25
|
-
* @param updateDecorationsEffect Facet for the prosemirror decorations
|
|
26
|
-
* @returns CodeMirror extension
|
|
27
|
-
*/
|
|
28
|
-
export declare const prosemirrorDecorationPlugin: (updateDecorationsEffect: Facet<DecorationSource>, editorView: EditorView, getPos: () => number | undefined) => ViewPlugin<{
|
|
29
|
-
decorations: DecorationSet;
|
|
30
|
-
update: (update: ViewUpdate) => void;
|
|
31
|
-
updateDecorations: (view: CodeMirror) => DecorationSet;
|
|
32
|
-
}>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@codemirror/state';
|
|
2
|
-
/**
|
|
3
|
-
* To have consistent behaviour with previous code block when a triple click occurs in the editor
|
|
4
|
-
* we should select the entire code block rather than the line.
|
|
5
|
-
*
|
|
6
|
-
* @returns CodeMirror extension
|
|
7
|
-
*/
|
|
8
|
-
export declare const tripleClickSelectAllExtension: () => Extension;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { LanguageSupport } from '@codemirror/language';
|
|
2
|
-
/**
|
|
3
|
-
* Returns a LanguageSupport instance for ActionScript.
|
|
4
|
-
*
|
|
5
|
-
* @returns {LanguageSupport} The language support for ActionScript.
|
|
6
|
-
* @example
|
|
7
|
-
* import { actionscriptLanguageSupport } from './languageSupport';
|
|
8
|
-
* const support = actionscriptLanguageSupport();
|
|
9
|
-
*/
|
|
10
|
-
export declare function actionscriptLanguageSupport(): LanguageSupport;
|
|
@@ -1,602 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_LANGUAGES: ({
|
|
2
|
-
readonly name: 'PHP';
|
|
3
|
-
readonly alias: readonly [
|
|
4
|
-
'php',
|
|
5
|
-
'php3',
|
|
6
|
-
'php4',
|
|
7
|
-
'php5'
|
|
8
|
-
];
|
|
9
|
-
readonly value: 'php';
|
|
10
|
-
} | {
|
|
11
|
-
readonly name: 'Java';
|
|
12
|
-
readonly alias: readonly [
|
|
13
|
-
'java'
|
|
14
|
-
];
|
|
15
|
-
readonly value: 'java';
|
|
16
|
-
} | {
|
|
17
|
-
readonly name: 'CSharp';
|
|
18
|
-
readonly alias: readonly [
|
|
19
|
-
'csharp',
|
|
20
|
-
'c#'
|
|
21
|
-
];
|
|
22
|
-
readonly value: 'cs';
|
|
23
|
-
} | {
|
|
24
|
-
readonly name: 'Python';
|
|
25
|
-
readonly alias: readonly [
|
|
26
|
-
'python',
|
|
27
|
-
'py'
|
|
28
|
-
];
|
|
29
|
-
readonly value: 'python';
|
|
30
|
-
} | {
|
|
31
|
-
readonly name: 'JavaScript';
|
|
32
|
-
readonly alias: readonly [
|
|
33
|
-
'javascript',
|
|
34
|
-
'js'
|
|
35
|
-
];
|
|
36
|
-
readonly value: 'javascript';
|
|
37
|
-
} | {
|
|
38
|
-
readonly name: 'Html';
|
|
39
|
-
readonly alias: readonly [
|
|
40
|
-
'html'
|
|
41
|
-
];
|
|
42
|
-
readonly value: 'xml';
|
|
43
|
-
} | {
|
|
44
|
-
readonly name: 'C++';
|
|
45
|
-
readonly alias: readonly [
|
|
46
|
-
'c++',
|
|
47
|
-
'cpp',
|
|
48
|
-
'clike'
|
|
49
|
-
];
|
|
50
|
-
readonly value: 'cpp';
|
|
51
|
-
} | {
|
|
52
|
-
readonly name: 'Ruby';
|
|
53
|
-
readonly alias: readonly [
|
|
54
|
-
'ruby',
|
|
55
|
-
'rb',
|
|
56
|
-
'duby'
|
|
57
|
-
];
|
|
58
|
-
readonly value: 'ruby';
|
|
59
|
-
} | {
|
|
60
|
-
readonly name: 'Objective-C';
|
|
61
|
-
readonly alias: readonly [
|
|
62
|
-
'objective-c',
|
|
63
|
-
'objectivec',
|
|
64
|
-
'obj-c',
|
|
65
|
-
'objc'
|
|
66
|
-
];
|
|
67
|
-
readonly value: 'objectivec';
|
|
68
|
-
} | {
|
|
69
|
-
readonly name: 'C';
|
|
70
|
-
readonly alias: readonly [
|
|
71
|
-
'c'
|
|
72
|
-
];
|
|
73
|
-
readonly value: 'cpp';
|
|
74
|
-
} | {
|
|
75
|
-
readonly name: 'Swift';
|
|
76
|
-
readonly alias: readonly [
|
|
77
|
-
'swift'
|
|
78
|
-
];
|
|
79
|
-
readonly value: 'swift';
|
|
80
|
-
} | {
|
|
81
|
-
readonly name: 'TeX';
|
|
82
|
-
readonly alias: readonly [
|
|
83
|
-
'tex',
|
|
84
|
-
'latex'
|
|
85
|
-
];
|
|
86
|
-
readonly value: 'tex';
|
|
87
|
-
} | {
|
|
88
|
-
readonly name: 'Shell';
|
|
89
|
-
readonly alias: readonly [
|
|
90
|
-
'shell',
|
|
91
|
-
'bash',
|
|
92
|
-
'sh',
|
|
93
|
-
'ksh',
|
|
94
|
-
'zsh'
|
|
95
|
-
];
|
|
96
|
-
readonly value: 'shell';
|
|
97
|
-
} | {
|
|
98
|
-
readonly name: 'Scala';
|
|
99
|
-
readonly alias: readonly [
|
|
100
|
-
'scala'
|
|
101
|
-
];
|
|
102
|
-
readonly value: 'scala';
|
|
103
|
-
} | {
|
|
104
|
-
readonly name: 'Go';
|
|
105
|
-
readonly alias: readonly [
|
|
106
|
-
'go'
|
|
107
|
-
];
|
|
108
|
-
readonly value: 'go';
|
|
109
|
-
} | {
|
|
110
|
-
readonly name: 'ActionScript';
|
|
111
|
-
readonly alias: readonly [
|
|
112
|
-
'actionscript',
|
|
113
|
-
'actionscript3',
|
|
114
|
-
'as'
|
|
115
|
-
];
|
|
116
|
-
readonly value: 'actionscript';
|
|
117
|
-
} | {
|
|
118
|
-
readonly name: 'ColdFusion';
|
|
119
|
-
readonly alias: readonly [
|
|
120
|
-
'coldfusion'
|
|
121
|
-
];
|
|
122
|
-
readonly value: 'xml';
|
|
123
|
-
} | {
|
|
124
|
-
readonly name: 'JavaFX';
|
|
125
|
-
readonly alias: readonly [
|
|
126
|
-
'javafx',
|
|
127
|
-
'jfx'
|
|
128
|
-
];
|
|
129
|
-
readonly value: 'java';
|
|
130
|
-
} | {
|
|
131
|
-
readonly name: 'VbNet';
|
|
132
|
-
readonly alias: readonly [
|
|
133
|
-
'vbnet',
|
|
134
|
-
'vb.net',
|
|
135
|
-
'vfp',
|
|
136
|
-
'clipper',
|
|
137
|
-
'xbase'
|
|
138
|
-
];
|
|
139
|
-
readonly value: 'vbnet';
|
|
140
|
-
} | {
|
|
141
|
-
readonly name: 'JSON';
|
|
142
|
-
readonly alias: readonly [
|
|
143
|
-
'json'
|
|
144
|
-
];
|
|
145
|
-
readonly value: 'json';
|
|
146
|
-
} | {
|
|
147
|
-
readonly name: 'MATLAB';
|
|
148
|
-
readonly alias: readonly [
|
|
149
|
-
'matlab'
|
|
150
|
-
];
|
|
151
|
-
readonly value: 'matlab';
|
|
152
|
-
} | {
|
|
153
|
-
readonly name: 'Groovy';
|
|
154
|
-
readonly alias: readonly [
|
|
155
|
-
'groovy'
|
|
156
|
-
];
|
|
157
|
-
readonly value: 'groovy';
|
|
158
|
-
} | {
|
|
159
|
-
readonly name: 'SQL';
|
|
160
|
-
readonly alias: readonly [
|
|
161
|
-
'sql',
|
|
162
|
-
'postgresql',
|
|
163
|
-
'postgres',
|
|
164
|
-
'plpgsql',
|
|
165
|
-
'psql',
|
|
166
|
-
'postgresql-console',
|
|
167
|
-
'postgres-console',
|
|
168
|
-
'tsql',
|
|
169
|
-
't-sql',
|
|
170
|
-
'mysql',
|
|
171
|
-
'sqlite'
|
|
172
|
-
];
|
|
173
|
-
readonly value: 'sql';
|
|
174
|
-
} | {
|
|
175
|
-
readonly name: 'R';
|
|
176
|
-
readonly alias: readonly [
|
|
177
|
-
'r'
|
|
178
|
-
];
|
|
179
|
-
readonly value: 'r';
|
|
180
|
-
} | {
|
|
181
|
-
readonly name: 'Perl';
|
|
182
|
-
readonly alias: readonly [
|
|
183
|
-
'perl',
|
|
184
|
-
'pl'
|
|
185
|
-
];
|
|
186
|
-
readonly value: 'perl';
|
|
187
|
-
} | {
|
|
188
|
-
readonly name: 'Lua';
|
|
189
|
-
readonly alias: readonly [
|
|
190
|
-
'lua'
|
|
191
|
-
];
|
|
192
|
-
readonly value: 'lua';
|
|
193
|
-
} | {
|
|
194
|
-
readonly name: 'Pascal';
|
|
195
|
-
readonly alias: readonly [
|
|
196
|
-
'pas',
|
|
197
|
-
'pascal',
|
|
198
|
-
'objectpascal',
|
|
199
|
-
'delphi'
|
|
200
|
-
];
|
|
201
|
-
readonly value: 'pascal';
|
|
202
|
-
} | {
|
|
203
|
-
readonly name: 'XML';
|
|
204
|
-
readonly alias: readonly [
|
|
205
|
-
'xml'
|
|
206
|
-
];
|
|
207
|
-
readonly value: 'xml';
|
|
208
|
-
} | {
|
|
209
|
-
readonly name: 'TypeScript';
|
|
210
|
-
readonly alias: readonly [
|
|
211
|
-
'typescript',
|
|
212
|
-
'ts'
|
|
213
|
-
];
|
|
214
|
-
readonly value: 'typescript';
|
|
215
|
-
} | {
|
|
216
|
-
readonly name: 'CoffeeScript';
|
|
217
|
-
readonly alias: readonly [
|
|
218
|
-
'coffeescript',
|
|
219
|
-
'coffee-script',
|
|
220
|
-
'coffee'
|
|
221
|
-
];
|
|
222
|
-
readonly value: 'coffeescript';
|
|
223
|
-
} | {
|
|
224
|
-
readonly name: 'Haskell';
|
|
225
|
-
readonly alias: readonly [
|
|
226
|
-
'haskell',
|
|
227
|
-
'hs'
|
|
228
|
-
];
|
|
229
|
-
readonly value: 'haskell';
|
|
230
|
-
} | {
|
|
231
|
-
readonly name: 'Puppet';
|
|
232
|
-
readonly alias: readonly [
|
|
233
|
-
'puppet'
|
|
234
|
-
];
|
|
235
|
-
readonly value: 'puppet';
|
|
236
|
-
} | {
|
|
237
|
-
readonly name: 'Arduino';
|
|
238
|
-
readonly alias: readonly [
|
|
239
|
-
'arduino'
|
|
240
|
-
];
|
|
241
|
-
readonly value: 'arduino';
|
|
242
|
-
} | {
|
|
243
|
-
readonly name: 'Fortran';
|
|
244
|
-
readonly alias: readonly [
|
|
245
|
-
'fortran'
|
|
246
|
-
];
|
|
247
|
-
readonly value: 'fortran';
|
|
248
|
-
} | {
|
|
249
|
-
readonly name: 'Erlang';
|
|
250
|
-
readonly alias: readonly [
|
|
251
|
-
'erlang',
|
|
252
|
-
'erl'
|
|
253
|
-
];
|
|
254
|
-
readonly value: 'erlang';
|
|
255
|
-
} | {
|
|
256
|
-
readonly name: 'PowerShell';
|
|
257
|
-
readonly alias: readonly [
|
|
258
|
-
'powershell',
|
|
259
|
-
'posh',
|
|
260
|
-
'ps1',
|
|
261
|
-
'psm1'
|
|
262
|
-
];
|
|
263
|
-
readonly value: 'powershell';
|
|
264
|
-
} | {
|
|
265
|
-
readonly name: 'Haxe';
|
|
266
|
-
readonly alias: readonly [
|
|
267
|
-
'haxe',
|
|
268
|
-
'hx',
|
|
269
|
-
'hxsl'
|
|
270
|
-
];
|
|
271
|
-
readonly value: 'haxe';
|
|
272
|
-
} | {
|
|
273
|
-
readonly name: 'Elixir';
|
|
274
|
-
readonly alias: readonly [
|
|
275
|
-
'elixir',
|
|
276
|
-
'ex',
|
|
277
|
-
'exs'
|
|
278
|
-
];
|
|
279
|
-
readonly value: 'elixir';
|
|
280
|
-
} | {
|
|
281
|
-
readonly name: 'Verilog';
|
|
282
|
-
readonly alias: readonly [
|
|
283
|
-
'verilog',
|
|
284
|
-
'v'
|
|
285
|
-
];
|
|
286
|
-
readonly value: 'verilog';
|
|
287
|
-
} | {
|
|
288
|
-
readonly name: 'Rust';
|
|
289
|
-
readonly alias: readonly [
|
|
290
|
-
'rust'
|
|
291
|
-
];
|
|
292
|
-
readonly value: 'rust';
|
|
293
|
-
} | {
|
|
294
|
-
readonly name: 'VHDL';
|
|
295
|
-
readonly alias: readonly [
|
|
296
|
-
'vhdl'
|
|
297
|
-
];
|
|
298
|
-
readonly value: 'vhdl';
|
|
299
|
-
} | {
|
|
300
|
-
readonly name: 'Sass';
|
|
301
|
-
readonly alias: readonly [
|
|
302
|
-
'sass'
|
|
303
|
-
];
|
|
304
|
-
readonly value: 'less';
|
|
305
|
-
} | {
|
|
306
|
-
readonly name: 'OCaml';
|
|
307
|
-
readonly alias: readonly [
|
|
308
|
-
'ocaml'
|
|
309
|
-
];
|
|
310
|
-
readonly value: 'ocaml';
|
|
311
|
-
} | {
|
|
312
|
-
readonly name: 'Dart';
|
|
313
|
-
readonly alias: readonly [
|
|
314
|
-
'dart'
|
|
315
|
-
];
|
|
316
|
-
readonly value: 'dart';
|
|
317
|
-
} | {
|
|
318
|
-
readonly name: 'CSS';
|
|
319
|
-
readonly alias: readonly [
|
|
320
|
-
'css'
|
|
321
|
-
];
|
|
322
|
-
readonly value: 'css';
|
|
323
|
-
} | {
|
|
324
|
-
readonly name: 'reStructuredText';
|
|
325
|
-
readonly alias: readonly [
|
|
326
|
-
'restructuredtext',
|
|
327
|
-
'rst',
|
|
328
|
-
'rest'
|
|
329
|
-
];
|
|
330
|
-
readonly value: 'rest';
|
|
331
|
-
} | {
|
|
332
|
-
readonly name: 'Kotlin';
|
|
333
|
-
readonly alias: readonly [
|
|
334
|
-
'kotlin'
|
|
335
|
-
];
|
|
336
|
-
readonly value: 'kotlin';
|
|
337
|
-
} | {
|
|
338
|
-
readonly name: 'D';
|
|
339
|
-
readonly alias: readonly [
|
|
340
|
-
'd'
|
|
341
|
-
];
|
|
342
|
-
readonly value: 'd';
|
|
343
|
-
} | {
|
|
344
|
-
readonly name: 'Octave';
|
|
345
|
-
readonly alias: readonly [
|
|
346
|
-
'octave'
|
|
347
|
-
];
|
|
348
|
-
readonly value: 'matlab';
|
|
349
|
-
} | {
|
|
350
|
-
readonly name: 'QML';
|
|
351
|
-
readonly alias: readonly [
|
|
352
|
-
'qbs',
|
|
353
|
-
'qml'
|
|
354
|
-
];
|
|
355
|
-
readonly value: 'qml';
|
|
356
|
-
} | {
|
|
357
|
-
readonly name: 'Prolog';
|
|
358
|
-
readonly alias: readonly [
|
|
359
|
-
'prolog'
|
|
360
|
-
];
|
|
361
|
-
readonly value: 'prolog';
|
|
362
|
-
} | {
|
|
363
|
-
readonly name: 'FoxPro';
|
|
364
|
-
readonly alias: readonly [
|
|
365
|
-
'foxpro',
|
|
366
|
-
'purebasic'
|
|
367
|
-
];
|
|
368
|
-
readonly value: 'purebasic';
|
|
369
|
-
} | {
|
|
370
|
-
readonly name: 'Scheme';
|
|
371
|
-
readonly alias: readonly [
|
|
372
|
-
'scheme',
|
|
373
|
-
'scm'
|
|
374
|
-
];
|
|
375
|
-
readonly value: 'scheme';
|
|
376
|
-
} | {
|
|
377
|
-
readonly name: 'CUDA';
|
|
378
|
-
readonly alias: readonly [
|
|
379
|
-
'cuda',
|
|
380
|
-
'cu'
|
|
381
|
-
];
|
|
382
|
-
readonly value: 'cpp';
|
|
383
|
-
} | {
|
|
384
|
-
readonly name: 'Julia';
|
|
385
|
-
readonly alias: readonly [
|
|
386
|
-
'julia',
|
|
387
|
-
'jl'
|
|
388
|
-
];
|
|
389
|
-
readonly value: 'julia';
|
|
390
|
-
} | {
|
|
391
|
-
readonly name: 'Racket';
|
|
392
|
-
readonly alias: readonly [
|
|
393
|
-
'racket',
|
|
394
|
-
'rkt'
|
|
395
|
-
];
|
|
396
|
-
readonly value: 'lisp';
|
|
397
|
-
} | {
|
|
398
|
-
readonly name: 'Ada';
|
|
399
|
-
readonly alias: readonly [
|
|
400
|
-
'ada',
|
|
401
|
-
'ada95',
|
|
402
|
-
'ada2005'
|
|
403
|
-
];
|
|
404
|
-
readonly value: 'ada';
|
|
405
|
-
} | {
|
|
406
|
-
readonly name: 'Tcl';
|
|
407
|
-
readonly alias: readonly [
|
|
408
|
-
'tcl'
|
|
409
|
-
];
|
|
410
|
-
readonly value: 'tcl';
|
|
411
|
-
} | {
|
|
412
|
-
readonly name: 'Mathematica';
|
|
413
|
-
readonly alias: readonly [
|
|
414
|
-
'mathematica',
|
|
415
|
-
'mma',
|
|
416
|
-
'nb'
|
|
417
|
-
];
|
|
418
|
-
readonly value: 'mathematica';
|
|
419
|
-
} | {
|
|
420
|
-
readonly name: 'Autoit';
|
|
421
|
-
readonly alias: readonly [
|
|
422
|
-
'autoit'
|
|
423
|
-
];
|
|
424
|
-
readonly value: 'autoit';
|
|
425
|
-
} | {
|
|
426
|
-
readonly name: 'StandardML';
|
|
427
|
-
readonly alias: readonly [
|
|
428
|
-
'standardmL',
|
|
429
|
-
'sml',
|
|
430
|
-
'standardml'
|
|
431
|
-
];
|
|
432
|
-
readonly value: 'sml';
|
|
433
|
-
} | {
|
|
434
|
-
readonly name: 'Objective-J';
|
|
435
|
-
readonly alias: readonly [
|
|
436
|
-
'objective-j',
|
|
437
|
-
'objectivej',
|
|
438
|
-
'obj-j',
|
|
439
|
-
'objj'
|
|
440
|
-
];
|
|
441
|
-
readonly value: 'objectivec';
|
|
442
|
-
} | {
|
|
443
|
-
readonly name: 'Smalltalk';
|
|
444
|
-
readonly alias: readonly [
|
|
445
|
-
'smalltalk',
|
|
446
|
-
'squeak',
|
|
447
|
-
'st'
|
|
448
|
-
];
|
|
449
|
-
readonly value: 'smalltalk';
|
|
450
|
-
} | {
|
|
451
|
-
readonly name: 'Vala';
|
|
452
|
-
readonly alias: readonly [
|
|
453
|
-
'vala',
|
|
454
|
-
'vapi'
|
|
455
|
-
];
|
|
456
|
-
readonly value: 'vala';
|
|
457
|
-
} | {
|
|
458
|
-
readonly name: 'LiveScript';
|
|
459
|
-
readonly alias: readonly [
|
|
460
|
-
'livescript',
|
|
461
|
-
'live-script'
|
|
462
|
-
];
|
|
463
|
-
readonly value: 'livescript';
|
|
464
|
-
} | {
|
|
465
|
-
readonly name: 'XQuery';
|
|
466
|
-
readonly alias: readonly [
|
|
467
|
-
'xquery',
|
|
468
|
-
'xqy',
|
|
469
|
-
'xq',
|
|
470
|
-
'xql',
|
|
471
|
-
'xqm'
|
|
472
|
-
];
|
|
473
|
-
readonly value: 'xquery';
|
|
474
|
-
} | {
|
|
475
|
-
readonly name: 'PlainText';
|
|
476
|
-
readonly alias: readonly [
|
|
477
|
-
'text',
|
|
478
|
-
'plaintext'
|
|
479
|
-
];
|
|
480
|
-
readonly value: 'text';
|
|
481
|
-
} | {
|
|
482
|
-
readonly name: 'Yaml';
|
|
483
|
-
readonly alias: readonly [
|
|
484
|
-
'yaml',
|
|
485
|
-
'yml'
|
|
486
|
-
];
|
|
487
|
-
readonly value: 'yaml';
|
|
488
|
-
} | {
|
|
489
|
-
readonly name: 'GraphQL';
|
|
490
|
-
readonly alias: readonly [
|
|
491
|
-
'graphql'
|
|
492
|
-
];
|
|
493
|
-
readonly value: 'graphql';
|
|
494
|
-
} | {
|
|
495
|
-
readonly name: 'AppleScript';
|
|
496
|
-
readonly alias: readonly [
|
|
497
|
-
'applescript'
|
|
498
|
-
];
|
|
499
|
-
readonly value: 'applescript';
|
|
500
|
-
} | {
|
|
501
|
-
readonly name: 'Clojure';
|
|
502
|
-
readonly alias: readonly [
|
|
503
|
-
'clojure'
|
|
504
|
-
];
|
|
505
|
-
readonly value: 'clojure';
|
|
506
|
-
} | {
|
|
507
|
-
readonly name: 'Diff';
|
|
508
|
-
readonly alias: readonly [
|
|
509
|
-
'diff'
|
|
510
|
-
];
|
|
511
|
-
readonly value: 'diff';
|
|
512
|
-
} | {
|
|
513
|
-
readonly name: 'VisualBasic';
|
|
514
|
-
readonly alias: readonly [
|
|
515
|
-
'visualbasic'
|
|
516
|
-
];
|
|
517
|
-
readonly value: 'visual-basic';
|
|
518
|
-
} | {
|
|
519
|
-
readonly name: 'JSX';
|
|
520
|
-
readonly alias: readonly [
|
|
521
|
-
'jsx'
|
|
522
|
-
];
|
|
523
|
-
readonly value: 'jsx';
|
|
524
|
-
} | {
|
|
525
|
-
readonly name: 'TSX';
|
|
526
|
-
readonly alias: readonly [
|
|
527
|
-
'tsx'
|
|
528
|
-
];
|
|
529
|
-
readonly value: 'tsx';
|
|
530
|
-
} | {
|
|
531
|
-
readonly name: 'SplunkSPL';
|
|
532
|
-
readonly alias: readonly [
|
|
533
|
-
'splunk-spl'
|
|
534
|
-
];
|
|
535
|
-
readonly value: 'splunk-spl';
|
|
536
|
-
} | {
|
|
537
|
-
readonly name: 'Dockerfile';
|
|
538
|
-
readonly alias: readonly [
|
|
539
|
-
'docker',
|
|
540
|
-
'dockerfile'
|
|
541
|
-
];
|
|
542
|
-
readonly value: 'dockerfile';
|
|
543
|
-
} | {
|
|
544
|
-
readonly name: 'HCL';
|
|
545
|
-
readonly alias: readonly [
|
|
546
|
-
'hcl',
|
|
547
|
-
'terraform'
|
|
548
|
-
];
|
|
549
|
-
readonly value: 'hcl';
|
|
550
|
-
} | {
|
|
551
|
-
readonly name: 'NGINX';
|
|
552
|
-
readonly alias: readonly [
|
|
553
|
-
'nginx'
|
|
554
|
-
];
|
|
555
|
-
readonly value: 'nginx';
|
|
556
|
-
} | {
|
|
557
|
-
readonly name: 'Protocol Buffers';
|
|
558
|
-
readonly alias: readonly [
|
|
559
|
-
'protobuf',
|
|
560
|
-
'proto'
|
|
561
|
-
];
|
|
562
|
-
readonly value: 'protobuf';
|
|
563
|
-
} | {
|
|
564
|
-
readonly name: 'TOML';
|
|
565
|
-
readonly alias: readonly [
|
|
566
|
-
'toml'
|
|
567
|
-
];
|
|
568
|
-
readonly value: 'toml';
|
|
569
|
-
} | {
|
|
570
|
-
readonly name: 'Handlebars';
|
|
571
|
-
readonly alias: readonly [
|
|
572
|
-
'handlebars',
|
|
573
|
-
'mustache'
|
|
574
|
-
];
|
|
575
|
-
readonly value: 'handlebars';
|
|
576
|
-
} | {
|
|
577
|
-
readonly name: 'Gherkin';
|
|
578
|
-
readonly alias: readonly [
|
|
579
|
-
'gherkin',
|
|
580
|
-
'cucumber'
|
|
581
|
-
];
|
|
582
|
-
readonly value: 'gherkin';
|
|
583
|
-
} | {
|
|
584
|
-
readonly name: 'ABAP';
|
|
585
|
-
readonly alias: readonly [
|
|
586
|
-
'abap'
|
|
587
|
-
];
|
|
588
|
-
readonly value: 'abap';
|
|
589
|
-
} | {
|
|
590
|
-
readonly name: 'Markdown';
|
|
591
|
-
readonly alias: readonly [
|
|
592
|
-
'markdown'
|
|
593
|
-
];
|
|
594
|
-
readonly value: 'markdown';
|
|
595
|
-
} | {
|
|
596
|
-
name: string;
|
|
597
|
-
alias: string[];
|
|
598
|
-
value: string;
|
|
599
|
-
})[];
|
|
600
|
-
export type Language = (typeof DEFAULT_LANGUAGES)[number];
|
|
601
|
-
declare const getLanguageName: (languageValue: string) => string | undefined;
|
|
602
|
-
export default getLanguageName;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { LanguageDescription } from '@codemirror/language';
|
|
2
|
-
import type { LanguageAlias } from '@atlaskit/code';
|
|
3
|
-
type LanguageAliasValue = LanguageAlias[0];
|
|
4
|
-
export declare const mapLanguageToCodeMirror: (language: LanguageAliasValue) => LanguageDescription | undefined;
|
|
5
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { LanguageSupport } from '@codemirror/language';
|
|
2
|
-
import type { Extension } from '@codemirror/state';
|
|
3
|
-
/**
|
|
4
|
-
* Manages loading the languages (for syntax highlighting, etc.)
|
|
5
|
-
* from CodeMirror and updating the language in the CodeMirror view
|
|
6
|
-
*/
|
|
7
|
-
export declare class LanguageLoader {
|
|
8
|
-
private updateLanguageCompartment;
|
|
9
|
-
private languageName;
|
|
10
|
-
constructor(updateLanguageCompartment: (value: LanguageSupport | [
|
|
11
|
-
LanguageSupport,
|
|
12
|
-
Extension
|
|
13
|
-
] | [
|
|
14
|
-
]) => void);
|
|
15
|
-
updateLanguage(languageName: string): Promise<void>;
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@codemirror/state';
|
|
2
|
-
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
4
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { CodeBlockAdvancedPlugin } from '../codeBlockAdvancedPluginType';
|
|
6
|
-
interface Props {
|
|
7
|
-
allowCodeFolding: boolean;
|
|
8
|
-
api: ExtractInjectionAPI<CodeBlockAdvancedPlugin> | undefined;
|
|
9
|
-
extensions: Extension[];
|
|
10
|
-
getIntl: () => IntlShape;
|
|
11
|
-
}
|
|
12
|
-
export declare const lazyCodeBlockView: (props: Props) => NodeViewConstructor;
|
|
13
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@codemirror/state';
|
|
2
|
-
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { CodeBlockAdvancedPlugin } from '../codeBlockAdvancedPluginType';
|
|
6
|
-
interface Props {
|
|
7
|
-
allowCodeFolding: boolean;
|
|
8
|
-
api: ExtractInjectionAPI<CodeBlockAdvancedPlugin> | undefined;
|
|
9
|
-
extensions: Extension[];
|
|
10
|
-
getIntl: () => IntlShape;
|
|
11
|
-
}
|
|
12
|
-
export declare const createPlugin: (props: Props) => SafePlugin;
|
|
13
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { HighlightStyle } from '@codemirror/language';
|
|
2
|
-
import type { Language } from '@codemirror/language';
|
|
3
|
-
export declare const highlightStyle: HighlightStyle;
|
|
4
|
-
/**
|
|
5
|
-
* Prismjs (renderer) and codemirror (editor) tokenise slightly differently,
|
|
6
|
-
* Occasionally we may want to override tokens for certain languages to
|
|
7
|
-
* get closer to renderer.
|
|
8
|
-
*
|
|
9
|
-
* Note the way that codemirror works - these styles get added on top of the styling above
|
|
10
|
-
* (and override existing tags).
|
|
11
|
-
*
|
|
12
|
-
* @param language Codemirror language to scope the changes to a specific language
|
|
13
|
-
* @returns Highlight style which can be used with the syntax highlighting extension
|
|
14
|
-
*/
|
|
15
|
-
export declare const languageStyling: (language: Language) => HighlightStyle | undefined;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@codemirror/state';
|
|
2
|
-
import type { EditorContentMode } from '@atlaskit/editor-common/types';
|
|
3
|
-
type ThemeOptions = {
|
|
4
|
-
contentMode?: EditorContentMode;
|
|
5
|
-
};
|
|
6
|
-
export declare const cmTheme: (options?: ThemeOptions) => Extension;
|
|
7
|
-
export declare const codeFoldingTheme: Extension;
|
|
8
|
-
export {};
|