@atlaskit/editor-plugin-code-block 5.0.11 → 5.0.13
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/codeBlockPluginType.d.ts +4 -4
- package/dist/types/nodeviews/code-block.d.ts +1 -1
- package/dist/types/pm-plugins/codeBlockCopySelectionPlugin.d.ts +1 -1
- package/dist/types/pm-plugins/main-state.d.ts +2 -2
- package/dist/types/pm-plugins/main.d.ts +2 -2
- package/dist/types/types/index.d.ts +2 -2
- package/dist/types-ts4.5/codeBlockPluginType.d.ts +4 -4
- package/dist/types-ts4.5/nodeviews/code-block.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/codeBlockCopySelectionPlugin.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main-state.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/types/index.d.ts +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block
|
|
2
2
|
|
|
3
|
+
## 5.0.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 5.0.12
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 5.0.11
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -19,13 +19,13 @@ type CodeBlockDependencies = [
|
|
|
19
19
|
OptionalPlugin<EditorViewModePlugin>
|
|
20
20
|
];
|
|
21
21
|
export type CodeBlockPlugin = NextEditorPlugin<'codeBlock', {
|
|
22
|
-
|
|
22
|
+
actions: {
|
|
23
|
+
insertCodeBlock: (inputMethod: INPUT_METHOD) => Command;
|
|
24
|
+
};
|
|
23
25
|
dependencies: CodeBlockDependencies;
|
|
26
|
+
pluginConfiguration: CodeBlockPluginOptions | undefined;
|
|
24
27
|
sharedState: {
|
|
25
28
|
copyButtonHoverNode: PMNode;
|
|
26
29
|
} | undefined;
|
|
27
|
-
actions: {
|
|
28
|
-
insertCodeBlock: (inputMethod: INPUT_METHOD) => Command;
|
|
29
|
-
};
|
|
30
30
|
}>;
|
|
31
31
|
export {};
|
|
@@ -4,8 +4,8 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
export declare const copySelectionPluginKey: PluginKey<any>;
|
|
6
6
|
type CodeBlockCopySelectionPluginState = {
|
|
7
|
-
decorationStartAndEnd?: [start: number, end: number];
|
|
8
7
|
codeBlockNode?: PMNode;
|
|
8
|
+
decorationStartAndEnd?: [start: number, end: number];
|
|
9
9
|
};
|
|
10
10
|
export declare function codeBlockCopySelectionPlugin(): SafePlugin<CodeBlockCopySelectionPluginState>;
|
|
11
11
|
export declare function provideVisualFeedbackForCopyButton(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export type CodeBlockState = {
|
|
4
|
-
pos: number | null;
|
|
5
4
|
contentCopied: boolean;
|
|
5
|
+
decorations: DecorationSet;
|
|
6
6
|
isNodeSelected: boolean;
|
|
7
|
+
pos: number | null;
|
|
7
8
|
shouldIgnoreFollowingMutations: boolean;
|
|
8
|
-
decorations: DecorationSet;
|
|
9
9
|
};
|
|
10
10
|
export declare const getPluginState: (state: EditorState) => CodeBlockState;
|
|
@@ -5,9 +5,9 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { CodeBlockPlugin } from '../index';
|
|
6
6
|
import { type CodeBlockState } from './main-state';
|
|
7
7
|
export declare const createPlugin: ({ useLongPressSelection, getIntl, allowCompositionInputOverride, api, }: {
|
|
8
|
-
useLongPressSelection?: boolean;
|
|
9
|
-
getIntl: () => IntlShape;
|
|
10
8
|
allowCompositionInputOverride?: boolean;
|
|
11
9
|
api?: ExtractInjectionAPI<CodeBlockPlugin>;
|
|
12
10
|
decorations?: DecorationSet;
|
|
11
|
+
getIntl: () => IntlShape;
|
|
12
|
+
useLongPressSelection?: boolean;
|
|
13
13
|
}) => SafePlugin<CodeBlockState>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
2
2
|
export interface CodeBlockPluginOptions extends LongPressSelectionPluginOptions {
|
|
3
|
-
allowCopyToClipboard?: boolean;
|
|
4
3
|
allowCompositionInputOverride?: boolean;
|
|
4
|
+
allowCopyToClipboard?: boolean;
|
|
5
5
|
overrideLanguageName?: (name: string) => string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -11,6 +11,6 @@ export interface CodeBlockPluginOptions extends LongPressSelectionPluginOptions
|
|
|
11
11
|
*/
|
|
12
12
|
export type CodeBlockOptions = CodeBlockPluginOptions;
|
|
13
13
|
export type CodeBlockLineAttributes = {
|
|
14
|
-
lineStart: number;
|
|
15
14
|
lineNumber: number;
|
|
15
|
+
lineStart: number;
|
|
16
16
|
};
|
|
@@ -19,13 +19,13 @@ type CodeBlockDependencies = [
|
|
|
19
19
|
OptionalPlugin<EditorViewModePlugin>
|
|
20
20
|
];
|
|
21
21
|
export type CodeBlockPlugin = NextEditorPlugin<'codeBlock', {
|
|
22
|
-
|
|
22
|
+
actions: {
|
|
23
|
+
insertCodeBlock: (inputMethod: INPUT_METHOD) => Command;
|
|
24
|
+
};
|
|
23
25
|
dependencies: CodeBlockDependencies;
|
|
26
|
+
pluginConfiguration: CodeBlockPluginOptions | undefined;
|
|
24
27
|
sharedState: {
|
|
25
28
|
copyButtonHoverNode: PMNode;
|
|
26
29
|
} | undefined;
|
|
27
|
-
actions: {
|
|
28
|
-
insertCodeBlock: (inputMethod: INPUT_METHOD) => Command;
|
|
29
|
-
};
|
|
30
30
|
}>;
|
|
31
31
|
export {};
|
|
@@ -4,11 +4,11 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
export declare const copySelectionPluginKey: PluginKey<any>;
|
|
6
6
|
type CodeBlockCopySelectionPluginState = {
|
|
7
|
+
codeBlockNode?: PMNode;
|
|
7
8
|
decorationStartAndEnd?: [
|
|
8
9
|
start: number,
|
|
9
10
|
end: number
|
|
10
11
|
];
|
|
11
|
-
codeBlockNode?: PMNode;
|
|
12
12
|
};
|
|
13
13
|
export declare function codeBlockCopySelectionPlugin(): SafePlugin<CodeBlockCopySelectionPluginState>;
|
|
14
14
|
export declare function provideVisualFeedbackForCopyButton(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export type CodeBlockState = {
|
|
4
|
-
pos: number | null;
|
|
5
4
|
contentCopied: boolean;
|
|
5
|
+
decorations: DecorationSet;
|
|
6
6
|
isNodeSelected: boolean;
|
|
7
|
+
pos: number | null;
|
|
7
8
|
shouldIgnoreFollowingMutations: boolean;
|
|
8
|
-
decorations: DecorationSet;
|
|
9
9
|
};
|
|
10
10
|
export declare const getPluginState: (state: EditorState) => CodeBlockState;
|
|
@@ -5,9 +5,9 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { CodeBlockPlugin } from '../index';
|
|
6
6
|
import { type CodeBlockState } from './main-state';
|
|
7
7
|
export declare const createPlugin: ({ useLongPressSelection, getIntl, allowCompositionInputOverride, api, }: {
|
|
8
|
-
useLongPressSelection?: boolean;
|
|
9
|
-
getIntl: () => IntlShape;
|
|
10
8
|
allowCompositionInputOverride?: boolean;
|
|
11
9
|
api?: ExtractInjectionAPI<CodeBlockPlugin>;
|
|
12
10
|
decorations?: DecorationSet;
|
|
11
|
+
getIntl: () => IntlShape;
|
|
12
|
+
useLongPressSelection?: boolean;
|
|
13
13
|
}) => SafePlugin<CodeBlockState>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
2
2
|
export interface CodeBlockPluginOptions extends LongPressSelectionPluginOptions {
|
|
3
|
-
allowCopyToClipboard?: boolean;
|
|
4
3
|
allowCompositionInputOverride?: boolean;
|
|
4
|
+
allowCopyToClipboard?: boolean;
|
|
5
5
|
overrideLanguageName?: (name: string) => string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
@@ -11,6 +11,6 @@ export interface CodeBlockPluginOptions extends LongPressSelectionPluginOptions
|
|
|
11
11
|
*/
|
|
12
12
|
export type CodeBlockOptions = CodeBlockPluginOptions;
|
|
13
13
|
export type CodeBlockLineAttributes = {
|
|
14
|
-
lineStart: number;
|
|
15
14
|
lineNumber: number;
|
|
15
|
+
lineStart: number;
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.13",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-interaction": "^5.0.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
42
|
-
"@atlaskit/icon": "^
|
|
42
|
+
"@atlaskit/icon": "^28.0.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/prosemirror-input-rules": "^3.4.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^107.
|
|
49
|
+
"@atlaskit/editor-common": "^107.28.0",
|
|
50
50
|
"react": "^18.2.0",
|
|
51
51
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
52
52
|
},
|