@atlaskit/editor-plugin-code-block 28.0.4 → 28.0.5
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/dist/cjs/codeBlockPlugin.js +14 -13
- package/dist/cjs/editor-commands/index.js +39 -38
- package/dist/cjs/pm-plugins/ide-ux/commands.js +16 -15
- package/dist/cjs/pm-plugins/input-rule.js +14 -12
- package/dist/cjs/pm-plugins/main.js +2 -2
- package/dist/cjs/pm-plugins/toolbar.js +11 -12
- package/dist/cjs/pm-plugins/transform-to-code-block.js +5 -4
- package/dist/cjs/ui/CodeBlockMenuItem.js +7 -7
- package/dist/cjs/ui/FormatCodeErrorFlag.js +5 -5
- package/dist/cjs/ui/LanguagePicker.js +4 -4
- package/dist/cjs/ui/class-names.js +9 -9
- package/dist/cjs/ui/icons/WrapIcon.js +2 -2
- package/dist/cjs/ui/language-picker-options.js +4 -4
- package/dist/cjs/ui/quick-insert/CodeBlockQuickInsertMenuItem.js +7 -7
- package/dist/cjs/ui/quick-insert/getCodeBlockQuickInsertComponents.js +3 -3
- package/dist/cjs/ui/recent-languages.js +2 -2
- package/dist/cjs/utils/auto-detect-view.js +4 -4
- package/dist/es2019/codeBlockPlugin.js +4 -3
- package/dist/es2019/editor-commands/index.js +4 -3
- package/dist/es2019/pm-plugins/ide-ux/commands.js +2 -1
- package/dist/es2019/pm-plugins/input-rule.js +6 -4
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/pm-plugins/toolbar.js +2 -1
- package/dist/es2019/pm-plugins/transform-to-code-block.js +3 -2
- package/dist/es2019/ui/CodeBlockMenuItem.js +3 -3
- package/dist/es2019/ui/FormatCodeErrorFlag.js +2 -2
- package/dist/es2019/ui/LanguagePicker.js +2 -2
- package/dist/es2019/ui/class-names.js +1 -1
- package/dist/es2019/ui/icons/WrapIcon.js +1 -1
- package/dist/es2019/ui/language-picker-options.js +1 -1
- package/dist/es2019/ui/quick-insert/CodeBlockQuickInsertMenuItem.js +2 -2
- package/dist/es2019/ui/quick-insert/getCodeBlockQuickInsertComponents.js +1 -1
- package/dist/es2019/ui/recent-languages.js +1 -1
- package/dist/es2019/utils/auto-detect-view.js +1 -1
- package/dist/esm/codeBlockPlugin.js +4 -3
- package/dist/esm/editor-commands/index.js +4 -3
- package/dist/esm/pm-plugins/ide-ux/commands.js +2 -1
- package/dist/esm/pm-plugins/input-rule.js +6 -4
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/pm-plugins/toolbar.js +2 -1
- package/dist/esm/pm-plugins/transform-to-code-block.js +3 -2
- package/dist/esm/ui/CodeBlockMenuItem.js +3 -3
- package/dist/esm/ui/FormatCodeErrorFlag.js +2 -2
- package/dist/esm/ui/LanguagePicker.js +2 -2
- package/dist/esm/ui/class-names.js +1 -1
- package/dist/esm/ui/icons/WrapIcon.js +1 -1
- package/dist/esm/ui/language-picker-options.js +1 -1
- package/dist/esm/ui/quick-insert/CodeBlockQuickInsertMenuItem.js +2 -2
- package/dist/esm/ui/quick-insert/getCodeBlockQuickInsertComponents.js +1 -1
- package/dist/esm/ui/recent-languages.js +1 -1
- package/dist/esm/utils/auto-detect-view.js +1 -1
- package/dist/types/codeBlockPluginType.d.ts +14 -13
- package/dist/types/editor-commands/index.d.ts +5 -3
- package/dist/types/nodeviews/code-block.d.ts +2 -1
- package/dist/types/pm-plugins/auto-detect.d.ts +1 -1
- package/dist/types/pm-plugins/ide-ux/commands.d.ts +2 -2
- package/dist/types/pm-plugins/ide-ux.d.ts +1 -1
- package/dist/types/pm-plugins/input-rule.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types/pm-plugins/toolbar.d.ts +2 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/CodeBlockLanguagePicker.d.ts +1 -1
- package/dist/types/ui/CodeBlockMenuItem.d.ts +1 -1
- package/dist/types/ui/FormatCodeErrorFlag.d.ts +1 -1
- package/dist/types/ui/LanguagePicker.d.ts +1 -1
- package/dist/types/ui/quick-insert/CodeBlockQuickInsertMenuItem.d.ts +1 -1
- package/dist/types/ui/quick-insert/getCodeBlockQuickInsertComponents.d.ts +1 -1
- package/dist/types/utils/auto-detect-view.d.ts +1 -1
- package/dist/types/utils/format-code/formatter.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Command
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
1
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
3
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
|
|
5
|
+
import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu/blockMenuPluginType';
|
|
6
|
+
import type { CompositionPlugin } from '@atlaskit/editor-plugin-composition/compositionPluginType';
|
|
7
|
+
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations/decorationsPluginType';
|
|
8
|
+
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled/editorDisabledPluginType';
|
|
9
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
|
|
10
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags/featureFlagsPluginType';
|
|
11
|
+
import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction/interaction-plugin-type';
|
|
12
|
+
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection/selection-plugin-type';
|
|
13
|
+
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar/toolbar-plugin-type';
|
|
14
|
+
import type { UiControlRegistryPlugin } from '@atlaskit/editor-plugin-ui-control-registry/ui-control-registry-plugin-type';
|
|
14
15
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
15
16
|
import type { CodeBlockState } from './pm-plugins/main-state';
|
|
16
17
|
import type { CodeBlockPluginOptions } from './types';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import type { Command
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
4
|
+
import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
|
|
5
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
6
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
7
|
import type { CodeBlockPlugin } from '../codeBlockPluginType';
|
|
6
8
|
import type { CodeBlockFormatProvider } from '../types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { getPosHandler, getPosHandlerNode } from '@atlaskit/editor-common/types/editor-plugin';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
5
|
import type { CodeBlockPlugin } from '../codeBlockPluginType';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { CodeBlockPlugin } from '../index';
|
|
4
4
|
import { type AutoDetectState } from './auto-detect-state';
|
|
5
5
|
export declare const createAutoDetectPlugin: (api?: ExtractInjectionAPI<CodeBlockPlugin>) => SafePlugin<AutoDetectState>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { CommandDispatch } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
|
+
import type { CommandDispatch } from '@atlaskit/editor-common/types/command';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
export declare const indent: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (state: EditorState, dispatch?: CommandDispatch) => boolean;
|
|
5
5
|
export declare const outdent: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (state: EditorState, dispatch?: CommandDispatch) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { CodeBlockPlugin } from '../index';
|
|
4
4
|
declare const ideUX: (pluginInjectionApi: ExtractInjectionAPI<CodeBlockPlugin> | undefined) => SafePlugin;
|
|
5
5
|
export default ideUX;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
export declare function createCodeBlockInputRule(schema: Schema, editorAnalyticsAPI?: EditorAnalyticsAPI): SafePlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
4
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { CodeBlockPlugin } from '../index';
|
|
6
6
|
import type { CodeBlockState } from './main-state';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FloatingToolbarHandler, SelectOption } from '@atlaskit/editor-common/types/floating-toolbar';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
3
|
import type { CodeBlockPlugin } from '../index';
|
|
3
4
|
import type { CodeBlockFormatProvider } from '../types';
|
|
4
5
|
import type { Language } from './language-list';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { CodeBlockPlugin } from '../index';
|
|
5
5
|
import { type LanguagePickerProps } from './LanguagePicker';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { BlockMenuItemComponentProps } from '@atlaskit/editor-plugin-block-menu/blockMenuPluginType';
|
|
4
4
|
import type { CodeBlockPlugin } from '../codeBlockPluginType';
|
|
5
5
|
export declare const createCodeBlockMenuItem: (api: ExtractInjectionAPI<CodeBlockPlugin> | undefined) => ({ isSuggested }?: BlockMenuItemComponentProps) => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { CodeBlockPlugin } from '../index';
|
|
4
4
|
export declare const FormatCodeErrorFlag: ({ api, }: {
|
|
5
5
|
api?: ExtractInjectionAPI<CodeBlockPlugin>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { IntlShape } from 'react-intl';
|
|
7
|
-
import type { SelectOption } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { SelectOption } from '@atlaskit/editor-common/types/floating-toolbar';
|
|
8
8
|
import { type LanguagePickerOption, type LanguagePickerSelectionSource } from './language-picker-options';
|
|
9
9
|
export type LanguagePickerProps = {
|
|
10
10
|
defaultValue?: LanguagePickerOption;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
4
|
import type { CodeBlockPlugin } from '../../codeBlockPluginType';
|
|
5
5
|
export declare const CodeBlockQuickInsertMenuItem: ({ api, previewImageUrls, }: {
|
|
6
6
|
api: ExtractInjectionAPI<CodeBlockPlugin> | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
2
|
import type { RegisterMenuItem } from '@atlaskit/editor-ui-control-model/types';
|
|
3
3
|
import type { CodeBlockPlugin } from '../../codeBlockPluginType';
|
|
4
4
|
export declare const getCodeBlockQuickInsertComponents: ({ api, }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { CodeBlockPlugin } from '../index';
|
|
4
4
|
export type AutoDetectTimer = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
2
2
|
import type { CodeBlockFormatProvider } from '../../types';
|
|
3
3
|
export type LanguageSource = 'auto-detected' | 'selected';
|
|
4
4
|
export declare const preloadFormatterOnIntent: (formatCodeProvider: CodeBlockFormatProvider | undefined, language: string | undefined) => Command;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
-
"version": "28.0.
|
|
3
|
+
"version": "28.0.5",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
46
46
|
"@atlaskit/react-select": "^4.12.0",
|
|
47
47
|
"@atlaskit/select": "^23.1.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^232.0.0",
|
|
49
49
|
"@atlaskit/tokens": "^20.4.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@compiled/react": "^1.0.2"
|