@atlaskit/editor-core 187.9.2 → 187.10.0
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 +10 -0
- package/dist/cjs/commands/index.js +8 -134
- package/dist/cjs/plugins/base/index.js +2 -2
- package/dist/cjs/plugins/block-type/commands/block-type.js +34 -36
- package/dist/cjs/plugins/block-type/commands/transform-to-code-block.js +1 -2
- package/dist/cjs/plugins/block-type/index.js +16 -13
- package/dist/cjs/plugins/block-type/pm-plugins/input-rule.js +19 -18
- package/dist/cjs/plugins/block-type/pm-plugins/keymap.js +12 -14
- package/dist/cjs/plugins/block-type/pm-plugins/main.js +9 -9
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +7 -7
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +3 -4
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +13 -5
- package/dist/cjs/plugins/block-type/utils.js +73 -2
- package/dist/cjs/plugins/caption/pm-plugins/keymap.js +2 -2
- package/dist/cjs/plugins/media/utils/media-common.js +5 -5
- package/dist/cjs/plugins/undo-redo/pm-plugins/keymaps.js +2 -2
- package/dist/cjs/ui/styles.js +4 -11
- package/dist/cjs/utils/index.js +4 -80
- package/dist/cjs/utils/input-rules.js +6 -66
- package/dist/cjs/utils/mark.js +2 -38
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/commands/index.js +1 -128
- package/dist/es2019/plugins/base/index.js +1 -1
- package/dist/es2019/plugins/block-type/commands/block-type.js +11 -13
- package/dist/es2019/plugins/block-type/commands/transform-to-code-block.js +1 -2
- package/dist/es2019/plugins/block-type/index.js +21 -12
- package/dist/es2019/plugins/block-type/pm-plugins/input-rule.js +18 -18
- package/dist/es2019/plugins/block-type/pm-plugins/keymap.js +8 -9
- package/dist/es2019/plugins/block-type/pm-plugins/main.js +9 -9
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +2 -2
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +2 -3
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +21 -2
- package/dist/es2019/plugins/block-type/utils.js +70 -1
- package/dist/es2019/plugins/caption/pm-plugins/keymap.js +1 -1
- package/dist/es2019/plugins/media/utils/media-common.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +1 -1
- package/dist/es2019/plugins/undo-redo/pm-plugins/keymaps.js +1 -1
- package/dist/es2019/ui/styles.js +0 -16
- package/dist/es2019/utils/index.js +0 -80
- package/dist/es2019/utils/input-rules.js +4 -61
- package/dist/es2019/utils/mark.js +0 -33
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/commands/index.js +7 -125
- package/dist/esm/plugins/base/index.js +1 -1
- package/dist/esm/plugins/block-type/commands/block-type.js +11 -13
- package/dist/esm/plugins/block-type/commands/transform-to-code-block.js +1 -2
- package/dist/esm/plugins/block-type/index.js +15 -12
- package/dist/esm/plugins/block-type/pm-plugins/input-rule.js +18 -18
- package/dist/esm/plugins/block-type/pm-plugins/keymap.js +8 -9
- package/dist/esm/plugins/block-type/pm-plugins/main.js +9 -9
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +2 -2
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +2 -3
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +8 -4
- package/dist/esm/plugins/block-type/utils.js +69 -1
- package/dist/esm/plugins/caption/pm-plugins/keymap.js +1 -1
- package/dist/esm/plugins/media/utils/media-common.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +1 -1
- package/dist/esm/plugins/undo-redo/pm-plugins/keymaps.js +1 -1
- package/dist/esm/ui/styles.js +3 -6
- package/dist/esm/utils/index.js +3 -77
- package/dist/esm/utils/input-rules.js +4 -61
- package/dist/esm/utils/mark.js +0 -35
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/commands/index.d.ts +0 -6
- package/dist/types/plugins/block-type/commands/block-type.d.ts +5 -6
- package/dist/types/plugins/block-type/commands/delete-and-move-cursor.d.ts +1 -1
- package/dist/types/plugins/block-type/commands/delete-block-content.d.ts +1 -1
- package/dist/types/plugins/block-type/index.d.ts +1 -1
- package/dist/types/plugins/block-type/pm-plugins/input-rule.d.ts +3 -2
- package/dist/types/plugins/block-type/pm-plugins/keymap.d.ts +2 -2
- package/dist/types/plugins/block-type/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/block-type/styles.d.ts +1 -1
- package/dist/types/plugins/block-type/types.d.ts +2 -3
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/blocktype-button.d.ts +1 -2
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +2 -2
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/styled.d.ts +5 -1
- package/dist/types/plugins/block-type/utils.d.ts +15 -1
- package/dist/types/plugins/undo-redo/pm-plugins/keymaps.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/styles.d.ts +0 -3
- package/dist/types/utils/index.d.ts +0 -6
- package/dist/types/utils/input-rules.d.ts +4 -16
- package/dist/types/utils/mark.d.ts +0 -1
- package/dist/types-ts4.5/commands/index.d.ts +0 -6
- package/dist/types-ts4.5/plugins/block-type/commands/block-type.d.ts +5 -6
- package/dist/types-ts4.5/plugins/block-type/commands/delete-and-move-cursor.d.ts +1 -1
- package/dist/types-ts4.5/plugins/block-type/commands/delete-block-content.d.ts +1 -1
- package/dist/types-ts4.5/plugins/block-type/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/block-type/pm-plugins/input-rule.d.ts +3 -2
- package/dist/types-ts4.5/plugins/block-type/pm-plugins/keymap.d.ts +2 -2
- package/dist/types-ts4.5/plugins/block-type/pm-plugins/main.d.ts +2 -1
- package/dist/types-ts4.5/plugins/block-type/styles.d.ts +1 -1
- package/dist/types-ts4.5/plugins/block-type/types.d.ts +2 -3
- package/dist/types-ts4.5/plugins/block-type/ui/ToolbarBlockType/blocktype-button.d.ts +1 -2
- package/dist/types-ts4.5/plugins/block-type/ui/ToolbarBlockType/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/block-type/ui/ToolbarBlockType/styled.d.ts +5 -1
- package/dist/types-ts4.5/plugins/block-type/utils.d.ts +15 -1
- package/dist/types-ts4.5/plugins/undo-redo/pm-plugins/keymaps.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/styles.d.ts +0 -3
- package/dist/types-ts4.5/utils/index.d.ts +0 -6
- package/dist/types-ts4.5/utils/input-rules.d.ts +4 -16
- package/dist/types-ts4.5/utils/mark.d.ts +0 -1
- package/package.json +4 -4
- package/report.api.md +6 -16
- package/tmp/api-report-tmp.d.ts +5 -16
- package/dist/cjs/types/allowed-block-types.js +0 -5
- package/dist/cjs/utils/keymap.js +0 -38
- package/dist/es2019/types/allowed-block-types.js +0 -1
- package/dist/es2019/utils/keymap.js +0 -33
- package/dist/esm/types/allowed-block-types.js +0 -1
- package/dist/esm/utils/keymap.js +0 -33
- package/dist/types/types/allowed-block-types.d.ts +0 -1
- package/dist/types/utils/keymap.d.ts +0 -11
- package/dist/types-ts4.5/types/allowed-block-types.d.ts +0 -1
- package/dist/types-ts4.5/utils/keymap.d.ts +0 -11
- /package/dist/cjs/{keymaps → plugins/block-type}/consts.js +0 -0
- /package/dist/es2019/{keymaps → plugins/block-type}/consts.js +0 -0
- /package/dist/esm/{keymaps → plugins/block-type}/consts.js +0 -0
- /package/dist/types/{keymaps → plugins/block-type}/consts.d.ts +0 -0
- /package/dist/types-ts4.5/{keymaps → plugins/block-type}/consts.d.ts +0 -0
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
/// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { Command } from '
|
|
6
|
-
import type { HeadingLevelsAndNormalText } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { HeadingLevelsAndNormalText, Command } from '@atlaskit/editor-common/types';
|
|
7
6
|
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
7
|
export type InputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD;
|
|
9
8
|
export declare function setBlockType(name: string): Command;
|
|
10
|
-
export declare function setBlockTypeWithAnalytics(name: string, inputMethod: InputMethod): Command;
|
|
9
|
+
export declare function setBlockTypeWithAnalytics(name: string, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined): Command;
|
|
11
10
|
export declare function setNormalText(): Command;
|
|
12
|
-
export declare function setNormalTextWithAnalytics(inputMethod: InputMethod): Command;
|
|
11
|
+
export declare function setNormalTextWithAnalytics(inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined): Command;
|
|
13
12
|
export declare function setHeading(level: HeadingLevelsAndNormalText): Command;
|
|
14
|
-
export declare const setHeadingWithAnalytics: (newHeadingLevel: HeadingLevelsAndNormalText, inputMethod: InputMethod) => Command;
|
|
13
|
+
export declare const setHeadingWithAnalytics: (newHeadingLevel: HeadingLevelsAndNormalText, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
15
14
|
export declare function insertBlockType(name: string): Command;
|
|
16
15
|
/**
|
|
17
16
|
*
|
|
@@ -21,7 +20,7 @@ export declare function insertBlockType(name: string): Command;
|
|
|
21
20
|
* otherwise Editor becomes very sad and crashes
|
|
22
21
|
* @returns - command that inserts block type
|
|
23
22
|
*/
|
|
24
|
-
export declare const insertBlockTypesWithAnalytics: (name: string, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined) =>
|
|
23
|
+
export declare const insertBlockTypesWithAnalytics: (name: string, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
25
24
|
/**
|
|
26
25
|
* This function creates a new transaction that wraps the current selection
|
|
27
26
|
* in the specified node type if it results in a valid transaction.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { BlockTypePluginOptions } from './types';
|
|
3
2
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { BlockTypePluginOptions } from './types';
|
|
4
4
|
declare const blockTypePlugin: NextEditorPlugin<'blockType', {
|
|
5
5
|
pluginConfiguration: BlockTypePluginOptions | undefined;
|
|
6
6
|
dependencies: [OptionalPlugin<typeof analyticsPlugin>];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
4
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
|
|
4
|
-
declare function inputRulePlugin(schema: Schema, featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
5
|
+
declare function inputRulePlugin(editorAnalyticsAPI: EditorAnalyticsAPI | undefined, schema: Schema, featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
5
6
|
export default inputRulePlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
4
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
|
|
4
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
export default function keymapPlugin(editorAnalyticsApi: EditorAnalyticsAPI | undefined, schema: Schema, _featureFlags: FeatureFlags): SafePlugin;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import type { BlockType } from '../types';
|
|
4
5
|
export type BlockTypeState = {
|
|
5
6
|
currentBlockType: BlockType;
|
|
@@ -8,4 +9,4 @@ export type BlockTypeState = {
|
|
|
8
9
|
availableWrapperBlockTypes: BlockType[];
|
|
9
10
|
};
|
|
10
11
|
export declare const pluginKey: PluginKey<BlockTypeState>;
|
|
11
|
-
export declare const createPlugin: (dispatch: (eventName: string | PluginKey, data: any) => void, lastNodeMustBeParagraph?: boolean) => SafePlugin<BlockTypeState>;
|
|
12
|
+
export declare const createPlugin: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, dispatch: (eventName: string | PluginKey, data: any) => void, lastNodeMustBeParagraph?: boolean) => SafePlugin<BlockTypeState>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
|
+
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
2
|
export declare const blocktypeStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { MessageDescriptor } from '../../types/i18n';
|
|
1
|
+
import type { MessageDescriptor } from 'react-intl-next';
|
|
3
2
|
import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { HeadingLevelsAndNormalText } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { HeadingLevelsAndNormalText, AllowedBlockTypes } from '@atlaskit/editor-common/types';
|
|
5
4
|
export declare const NORMAL_TEXT: BlockType;
|
|
6
5
|
export declare const HEADING_1: BlockType;
|
|
7
6
|
export declare const HEADING_2: BlockType;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
import type { MessageDescriptor } from '../../../../types/i18n';
|
|
3
|
+
import type { WrappedComponentProps, MessageDescriptor } from 'react-intl-next';
|
|
5
4
|
export interface BlockTypeButtonProps {
|
|
6
5
|
isSmall?: boolean;
|
|
7
6
|
isReducedSpacing?: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
+
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
4
6
|
import type { BlockTypeState } from '../../pm-plugins/main';
|
|
5
7
|
import type { BlockType } from '../../types';
|
|
6
|
-
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
export type DropdownItem = MenuItem & {
|
|
9
9
|
value: BlockType;
|
|
10
10
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
|
+
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
2
|
export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean) => (themeProps: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const keyboardShortcut: import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const keyboardShortcutSelect: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const buttonContentStyle: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const buttonContentReducedSpacingStyle: import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const wrapperSmallStyle: import("@emotion/react").SerializedStyles;
|
|
8
|
+
export declare const expandIconWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { Node as PMNode, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { InputRuleWrapper } from '@atlaskit/prosemirror-input-rules';
|
|
2
4
|
export declare const isNodeAWrappingBlockNode: (node?: PMNode | null) => boolean;
|
|
5
|
+
export declare const createJoinNodesRule: (match: RegExp, nodeType: NodeType) => InputRuleWrapper;
|
|
6
|
+
type WrappingTextRuleProps = {
|
|
7
|
+
match: RegExp;
|
|
8
|
+
nodeType: NodeType;
|
|
9
|
+
getAttrs?: Record<string, any> | ((matchResult: RegExpExecArray) => Record<string, any>);
|
|
10
|
+
};
|
|
11
|
+
export declare const createWrappingTextBlockRule: ({ match, nodeType, getAttrs, }: WrappingTextRuleProps) => InputRuleWrapper;
|
|
12
|
+
/**
|
|
13
|
+
* Function will check if changing block types: Paragraph, Heading is enabled.
|
|
14
|
+
*/
|
|
15
|
+
export declare function areBlockTypesDisabled(state: EditorState): boolean;
|
|
16
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
1
|
+
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
export declare function keymapPlugin(): SafePlugin;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { AllowedBlockTypes } from '@atlaskit/editor-common/types';
|
|
1
2
|
export type { EditorInstance } from './editor-instance';
|
|
2
3
|
export type { EditorConfig } from './editor-config';
|
|
3
4
|
export type { NextEditorPlugin, EditorPlugin, PluginsOptions, } from './editor-plugin';
|
|
@@ -7,7 +8,6 @@ export type { EditorAppearanceComponentProps } from './editor-appearance-compone
|
|
|
7
8
|
export type { Command, CommandDispatch } from './command';
|
|
8
9
|
export type { MessageDescriptor } from './i18n';
|
|
9
10
|
export type { DomAtPos } from './dom-at-pos';
|
|
10
|
-
export type { AllowedBlockTypes } from './allowed-block-types';
|
|
11
11
|
export type { ExtensionConfig } from './extension-config';
|
|
12
12
|
export type { EditorAppearance } from './editor-appearance';
|
|
13
13
|
export type { ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, } from '../ui/Toolbar/types';
|
|
@@ -3,7 +3,7 @@ export declare const fullPageEditorWrapper: import("@emotion/react").SerializedS
|
|
|
3
3
|
export declare const ScrollContainer: import("react").ForwardRefExoticComponent<Pick<{
|
|
4
4
|
theme?: any;
|
|
5
5
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
6
|
-
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "dir" | "color" | "content" | "height" | "width" | "media" | "mediaGroup" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "default" | "action" | "disabled" | "children" | "property" | "aria-hidden" | "size" | "
|
|
6
|
+
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "dir" | "color" | "content" | "height" | "width" | "media" | "mediaGroup" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "default" | "action" | "disabled" | "children" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof {
|
|
7
7
|
theme?: any;
|
|
8
8
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
9
9
|
}> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -8,6 +8,6 @@ type ContentStylesProps = {
|
|
|
8
8
|
featureFlags?: FeatureFlags;
|
|
9
9
|
};
|
|
10
10
|
type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
|
|
11
|
-
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "dir" | "color" | "content" | "height" | "width" | "media" | "mediaGroup" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "default" | "action" | "disabled" | "children" | "property" | "aria-hidden" | "size" | "
|
|
12
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "dir" | "color" | "content" | "height" | "width" | "media" | "mediaGroup" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "default" | "action" | "disabled" | "children" | "property" | "aria-hidden" | "size" | "
|
|
11
|
+
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "dir" | "color" | "content" | "height" | "width" | "media" | "mediaGroup" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "default" | "action" | "disabled" | "children" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "dir" | "color" | "content" | "height" | "width" | "media" | "mediaGroup" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "default" | "action" | "disabled" | "children" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export default _default;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
export { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
2
2
|
export { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
3
|
-
export declare const wrapperSmallStyle: import("@emotion/react").SerializedStyles;
|
|
4
3
|
export declare const expandIconWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
5
|
-
export declare const buttonContentStyle: import("@emotion/react").SerializedStyles;
|
|
6
|
-
export declare const buttonContentReducedSpacingStyle: import("@emotion/react").SerializedStyles;
|
|
7
4
|
export declare const clickSelectWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -8,8 +8,6 @@ export { isParagraph, isText, isLinkMark } from './nodes';
|
|
|
8
8
|
export { setNodeSelection, setGapCursorSelection, setTextSelection, } from './selection';
|
|
9
9
|
export type { JSONDocNode };
|
|
10
10
|
export { default as measurements } from './performance/measure-enum';
|
|
11
|
-
export declare function canMoveUp(state: EditorState): boolean;
|
|
12
|
-
export declare function canMoveDown(state: EditorState): boolean;
|
|
13
11
|
export declare function isSelectionInsideLastNodeInDocument(selection: Selection): boolean;
|
|
14
12
|
export declare function getCursor(selection: Selection): ResolvedPos | undefined;
|
|
15
13
|
/**
|
|
@@ -27,10 +25,6 @@ export declare function nodeToJSON(node: Node): JSONNode;
|
|
|
27
25
|
*/
|
|
28
26
|
export declare function stringRepeat(text: string, length: number): string;
|
|
29
27
|
export declare function whichTransitionEvent<TransitionEventName extends string>(): TransitionEventName | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Function will check if changing block types: Paragraph, Heading is enabled.
|
|
32
|
-
*/
|
|
33
|
-
export declare function areBlockTypesDisabled(state: EditorState): boolean;
|
|
34
28
|
export declare const isTemporary: (id: string) => boolean;
|
|
35
29
|
export declare const isEmptyNode: (schema: Schema) => (node: Node) => boolean;
|
|
36
30
|
export declare const insideTableCell: (state: EditorState) => boolean;
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
import type { Node as PMNode, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
2
|
import type { InputRuleWrapper } from '@atlaskit/prosemirror-input-rules';
|
|
4
3
|
import type { AnalyticsEventPayload } from '../plugins/analytics/types';
|
|
5
|
-
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
6
4
|
type GetPayload = AnalyticsEventPayload | ((state: EditorState, matchResult: RegExpExecArray) => AnalyticsEventPayload);
|
|
5
|
+
/**
|
|
6
|
+
* @private
|
|
7
|
+
* @deprecated Use import {inputRuleWithAnalytics} from "@atlaskit/editor-common/utils"; instead
|
|
8
|
+
*/
|
|
7
9
|
export declare const ruleWithAnalytics: (getPayload: GetPayload) => (originalRule: InputRuleWrapper) => InputRuleWrapper;
|
|
8
|
-
type WrappingTextRuleProps = {
|
|
9
|
-
match: RegExp;
|
|
10
|
-
nodeType: NodeType;
|
|
11
|
-
getAttrs?: Record<string, any> | ((matchResult: RegExpExecArray) => Record<string, any>);
|
|
12
|
-
};
|
|
13
|
-
export declare const createWrappingTextBlockRule: ({ match, nodeType, getAttrs, }: WrappingTextRuleProps) => InputRuleWrapper;
|
|
14
|
-
type WrappingRuleProps = {
|
|
15
|
-
match: RegExp;
|
|
16
|
-
nodeType: NodeType;
|
|
17
|
-
getAttrs?: Record<string, any> | ((matchResult: RegExpExecArray) => Record<string, any>);
|
|
18
|
-
joinPredicate?: (matchResult: RegExpExecArray, node: PMNode, joinScenario: JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST) => boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare const createWrappingJoinRule: ({ match, nodeType, getAttrs, joinPredicate, }: WrappingRuleProps) => InputRuleWrapper;
|
|
21
|
-
export declare const createJoinNodesRule: (match: RegExp, nodeType: NodeType) => InputRuleWrapper;
|
|
22
10
|
export {};
|
|
@@ -2,7 +2,6 @@ import type { Node, Mark, MarkType, NodeType } from '@atlaskit/editor-prosemirro
|
|
|
2
2
|
import type { SelectionRange, EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
export declare const isMarkAllowedInRange: (doc: Node, ranges: readonly SelectionRange[], type: MarkType) => boolean;
|
|
4
4
|
export declare const isMarkExcluded: (type: MarkType, marks?: readonly Mark[] | null) => boolean;
|
|
5
|
-
export declare const removeBlockMarks: (state: EditorState, marks: Array<MarkType | undefined>) => Transaction | undefined;
|
|
6
5
|
/**
|
|
7
6
|
* Removes marks from nodes in the current selection that are not supported
|
|
8
7
|
*/
|
|
@@ -2,12 +2,6 @@ import type { MarkType, NodeType, Node as PMNode, Schema } from '@atlaskit/edito
|
|
|
2
2
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { AlignmentState } from '../plugins/alignment/pm-plugins/types';
|
|
4
4
|
import type { Command } from '../types';
|
|
5
|
-
export declare function preventDefault(): Command;
|
|
6
|
-
export declare function insertNewLine(): Command;
|
|
7
|
-
export declare const insertNewLineWithAnalytics: Command;
|
|
8
|
-
export declare const createNewParagraphAbove: Command;
|
|
9
|
-
export declare const createNewParagraphBelow: Command;
|
|
10
|
-
export declare function createParagraphNear(append?: boolean): Command;
|
|
11
5
|
export declare function addParagraphAtEnd(tr: Transaction): void;
|
|
12
6
|
export declare function createParagraphAtEnd(): Command;
|
|
13
7
|
export declare const changeImageAlignment: (align?: AlignmentState) => Command;
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
/// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { Command } from '
|
|
6
|
-
import type { HeadingLevelsAndNormalText } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { HeadingLevelsAndNormalText, Command } from '@atlaskit/editor-common/types';
|
|
7
6
|
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
7
|
export type InputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD;
|
|
9
8
|
export declare function setBlockType(name: string): Command;
|
|
10
|
-
export declare function setBlockTypeWithAnalytics(name: string, inputMethod: InputMethod): Command;
|
|
9
|
+
export declare function setBlockTypeWithAnalytics(name: string, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined): Command;
|
|
11
10
|
export declare function setNormalText(): Command;
|
|
12
|
-
export declare function setNormalTextWithAnalytics(inputMethod: InputMethod): Command;
|
|
11
|
+
export declare function setNormalTextWithAnalytics(inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined): Command;
|
|
13
12
|
export declare function setHeading(level: HeadingLevelsAndNormalText): Command;
|
|
14
|
-
export declare const setHeadingWithAnalytics: (newHeadingLevel: HeadingLevelsAndNormalText, inputMethod: InputMethod) => Command;
|
|
13
|
+
export declare const setHeadingWithAnalytics: (newHeadingLevel: HeadingLevelsAndNormalText, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
15
14
|
export declare function insertBlockType(name: string): Command;
|
|
16
15
|
/**
|
|
17
16
|
*
|
|
@@ -21,7 +20,7 @@ export declare function insertBlockType(name: string): Command;
|
|
|
21
20
|
* otherwise Editor becomes very sad and crashes
|
|
22
21
|
* @returns - command that inserts block type
|
|
23
22
|
*/
|
|
24
|
-
export declare const insertBlockTypesWithAnalytics: (name: string, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined) =>
|
|
23
|
+
export declare const insertBlockTypesWithAnalytics: (name: string, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
25
24
|
/**
|
|
26
25
|
* This function creates a new transaction that wraps the current selection
|
|
27
26
|
* in the specified node type if it results in a valid transaction.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { BlockTypePluginOptions } from './types';
|
|
3
2
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { BlockTypePluginOptions } from './types';
|
|
4
4
|
declare const blockTypePlugin: NextEditorPlugin<'blockType', {
|
|
5
5
|
pluginConfiguration: BlockTypePluginOptions | undefined;
|
|
6
6
|
dependencies: [
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
2
4
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
|
|
4
|
-
declare function inputRulePlugin(schema: Schema, featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
5
|
+
declare function inputRulePlugin(editorAnalyticsAPI: EditorAnalyticsAPI | undefined, schema: Schema, featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
5
6
|
export default inputRulePlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
4
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
|
|
4
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
export default function keymapPlugin(editorAnalyticsApi: EditorAnalyticsAPI | undefined, schema: Schema, _featureFlags: FeatureFlags): SafePlugin;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
4
|
import type { BlockType } from '../types';
|
|
4
5
|
export type BlockTypeState = {
|
|
5
6
|
currentBlockType: BlockType;
|
|
@@ -8,4 +9,4 @@ export type BlockTypeState = {
|
|
|
8
9
|
availableWrapperBlockTypes: BlockType[];
|
|
9
10
|
};
|
|
10
11
|
export declare const pluginKey: PluginKey<BlockTypeState>;
|
|
11
|
-
export declare const createPlugin: (dispatch: (eventName: string | PluginKey, data: any) => void, lastNodeMustBeParagraph?: boolean) => SafePlugin<BlockTypeState>;
|
|
12
|
+
export declare const createPlugin: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, dispatch: (eventName: string | PluginKey, data: any) => void, lastNodeMustBeParagraph?: boolean) => SafePlugin<BlockTypeState>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
|
+
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
2
|
export declare const blocktypeStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { MessageDescriptor } from '../../types/i18n';
|
|
1
|
+
import type { MessageDescriptor } from 'react-intl-next';
|
|
3
2
|
import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { HeadingLevelsAndNormalText } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { HeadingLevelsAndNormalText, AllowedBlockTypes } from '@atlaskit/editor-common/types';
|
|
5
4
|
export declare const NORMAL_TEXT: BlockType;
|
|
6
5
|
export declare const HEADING_1: BlockType;
|
|
7
6
|
export declare const HEADING_2: BlockType;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
import type { MessageDescriptor } from '../../../../types/i18n';
|
|
3
|
+
import type { WrappedComponentProps, MessageDescriptor } from 'react-intl-next';
|
|
5
4
|
export interface BlockTypeButtonProps {
|
|
6
5
|
isSmall?: boolean;
|
|
7
6
|
isReducedSpacing?: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
+
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
4
6
|
import type { BlockTypeState } from '../../pm-plugins/main';
|
|
5
7
|
import type { BlockType } from '../../types';
|
|
6
|
-
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
export type DropdownItem = MenuItem & {
|
|
9
9
|
value: BlockType;
|
|
10
10
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
|
+
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
2
|
export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean) => (themeProps: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const keyboardShortcut: import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const keyboardShortcutSelect: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const buttonContentStyle: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const buttonContentReducedSpacingStyle: import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const wrapperSmallStyle: import("@emotion/react").SerializedStyles;
|
|
8
|
+
export declare const expandIconWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { Node as PMNode, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { InputRuleWrapper } from '@atlaskit/prosemirror-input-rules';
|
|
2
4
|
export declare const isNodeAWrappingBlockNode: (node?: PMNode | null) => boolean;
|
|
5
|
+
export declare const createJoinNodesRule: (match: RegExp, nodeType: NodeType) => InputRuleWrapper;
|
|
6
|
+
type WrappingTextRuleProps = {
|
|
7
|
+
match: RegExp;
|
|
8
|
+
nodeType: NodeType;
|
|
9
|
+
getAttrs?: Record<string, any> | ((matchResult: RegExpExecArray) => Record<string, any>);
|
|
10
|
+
};
|
|
11
|
+
export declare const createWrappingTextBlockRule: ({ match, nodeType, getAttrs, }: WrappingTextRuleProps) => InputRuleWrapper;
|
|
12
|
+
/**
|
|
13
|
+
* Function will check if changing block types: Paragraph, Heading is enabled.
|
|
14
|
+
*/
|
|
15
|
+
export declare function areBlockTypesDisabled(state: EditorState): boolean;
|
|
16
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
1
|
+
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
export declare function keymapPlugin(): SafePlugin;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { AllowedBlockTypes } from '@atlaskit/editor-common/types';
|
|
1
2
|
export type { EditorInstance } from './editor-instance';
|
|
2
3
|
export type { EditorConfig } from './editor-config';
|
|
3
4
|
export type { NextEditorPlugin, EditorPlugin, PluginsOptions, } from './editor-plugin';
|
|
@@ -7,7 +8,6 @@ export type { EditorAppearanceComponentProps } from './editor-appearance-compone
|
|
|
7
8
|
export type { Command, CommandDispatch } from './command';
|
|
8
9
|
export type { MessageDescriptor } from './i18n';
|
|
9
10
|
export type { DomAtPos } from './dom-at-pos';
|
|
10
|
-
export type { AllowedBlockTypes } from './allowed-block-types';
|
|
11
11
|
export type { ExtensionConfig } from './extension-config';
|
|
12
12
|
export type { EditorAppearance } from './editor-appearance';
|
|
13
13
|
export type { ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, } from '../ui/Toolbar/types';
|