@atlaskit/editor-core 220.0.3 → 220.1.1
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 +83 -0
- package/codemods/createRenameVariableTransform.ts +17 -0
- package/codemods/findImportFromPackage.ts +54 -0
- package/codemods/migrates/createJSXRenameVariableToNestedKeyTransform.ts +43 -0
- package/codemods/migrates/createUpdateEditorToMigrationComponent.ts +25 -0
- package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +1 -1
- package/codemods/migrates/remove-config-panel-width-prop.ts +1 -1
- package/codemods/migrates/rename-editor-to-editor-migration-component.ts +1 -22
- package/codemods/migrates/rename-smartlinks-prop.ts +1 -40
- package/codemods/migrates/rename-unsafe-allowUndoRedoButtons-prop.ts +1 -1
- package/codemods/migrates/rename-unsafe-cards-prop.ts +1 -1
- package/codemods/utils.ts +0 -67
- package/dist/cjs/actions/isEmptyParagraph.js +12 -0
- package/dist/cjs/actions/temp-is-empty-document.js +2 -9
- package/dist/cjs/composable-editor/BaseThemeWrapper.js +24 -5
- package/dist/cjs/composable-editor/editor-internal-compiled.js +5 -1
- package/dist/cjs/composable-editor/editor-internal-emotion.js +6 -2
- package/dist/cjs/composable-editor/editor-internal.js +11 -2
- package/dist/cjs/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
- package/dist/cjs/create-editor/ReactEditorView.js +6 -4
- package/dist/cjs/create-editor/addMetadataAttributes.js +36 -0
- package/dist/cjs/create-editor/create-editor.js +0 -62
- package/dist/cjs/create-editor/create-plugins-list.js +2 -15
- package/dist/cjs/create-editor/create-schema.js +4 -35
- package/dist/cjs/create-editor/createErrorReporter.js +14 -0
- package/dist/cjs/create-editor/createPMPlugins.js +39 -0
- package/dist/cjs/create-editor/fixExcludes.js +22 -0
- package/dist/cjs/create-editor/getScrollGutterOptions.js +19 -0
- package/dist/cjs/create-editor/sortByRank.js +9 -0
- package/dist/cjs/entry-points/test-utils.js +4 -2
- package/dist/cjs/isElementBySelectorInDocument.js +15 -0
- package/dist/cjs/setTextSelection.js +12 -0
- package/dist/cjs/test-utils.js +1 -18
- package/dist/cjs/ui/Addon/checkForModal.js +25 -0
- package/dist/cjs/ui/Addon/click-area-helper.js +5 -52
- package/dist/cjs/ui/Addon/outsideProsemirrorEditorClickHandler.js +35 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +4 -16
- package/dist/cjs/ui/Appearance/ChromelessEditorContainer.js +19 -0
- package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +13 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +5 -2
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +2 -15
- package/dist/cjs/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +13 -0
- package/dist/cjs/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +13 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +15 -21
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +12 -17
- package/dist/cjs/ui/EditorContentContainer/styles/mentions.js +19 -0
- package/dist/cjs/utils/combineQuickInsertProviders.js +16 -0
- package/dist/cjs/utils/extensions.js +0 -11
- package/dist/cjs/utils/getNodesVisibleInViewport.js +3 -12
- package/dist/cjs/utils/isNodeVisible.js +15 -0
- package/dist/cjs/utils/prepare-quick-insert-provider.js +2 -1
- package/dist/cjs/utils/validNode.js +14 -0
- package/dist/cjs/utils/validateNodes.js +3 -11
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/isEmptyParagraph.js +6 -0
- package/dist/es2019/actions/temp-is-empty-document.js +1 -6
- package/dist/es2019/composable-editor/BaseThemeWrapper.js +19 -3
- package/dist/es2019/composable-editor/editor-internal-compiled.js +5 -1
- package/dist/es2019/composable-editor/editor-internal-emotion.js +6 -2
- package/dist/es2019/composable-editor/editor-internal.js +11 -2
- package/dist/es2019/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
- package/dist/es2019/create-editor/ReactEditorView.js +3 -1
- package/dist/es2019/create-editor/addMetadataAttributes.js +29 -0
- package/dist/es2019/create-editor/create-editor.js +0 -53
- package/dist/es2019/create-editor/create-plugins-list.js +1 -13
- package/dist/es2019/create-editor/create-schema.js +2 -31
- package/dist/es2019/create-editor/createErrorReporter.js +8 -0
- package/dist/es2019/create-editor/createPMPlugins.js +30 -0
- package/dist/es2019/create-editor/fixExcludes.js +12 -0
- package/dist/es2019/create-editor/getScrollGutterOptions.js +13 -0
- package/dist/es2019/create-editor/sortByRank.js +3 -0
- package/dist/es2019/entry-points/test-utils.js +3 -1
- package/dist/es2019/isElementBySelectorInDocument.js +9 -0
- package/dist/es2019/setTextSelection.js +8 -0
- package/dist/es2019/test-utils.js +0 -18
- package/dist/es2019/ui/Addon/checkForModal.js +19 -0
- package/dist/es2019/ui/Addon/click-area-helper.js +2 -53
- package/dist/es2019/ui/Addon/outsideProsemirrorEditorClickHandler.js +33 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +2 -12
- package/dist/es2019/ui/Appearance/ChromelessEditorContainer.js +12 -0
- package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +5 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -1
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +1 -8
- package/dist/es2019/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +5 -0
- package/dist/es2019/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +5 -0
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +14 -19
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +17 -14
- package/dist/es2019/ui/EditorContentContainer/styles/mentions.js +19 -0
- package/dist/es2019/utils/combineQuickInsertProviders.js +11 -0
- package/dist/es2019/utils/extensions.js +0 -11
- package/dist/es2019/utils/getNodesVisibleInViewport.js +1 -9
- package/dist/es2019/utils/isNodeVisible.js +9 -0
- package/dist/es2019/utils/prepare-quick-insert-provider.js +2 -1
- package/dist/es2019/utils/validNode.js +8 -0
- package/dist/es2019/utils/validateNodes.js +1 -8
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/isEmptyParagraph.js +6 -0
- package/dist/esm/actions/temp-is-empty-document.js +1 -6
- package/dist/esm/composable-editor/BaseThemeWrapper.js +23 -4
- package/dist/esm/composable-editor/editor-internal-compiled.js +5 -1
- package/dist/esm/composable-editor/editor-internal-emotion.js +6 -2
- package/dist/esm/composable-editor/editor-internal.js +11 -2
- package/dist/esm/create-editor/ReactEditorView/useDispatchTransaction.js +2 -1
- package/dist/esm/create-editor/ReactEditorView.js +3 -1
- package/dist/esm/create-editor/addMetadataAttributes.js +29 -0
- package/dist/esm/create-editor/create-editor.js +0 -58
- package/dist/esm/create-editor/create-plugins-list.js +1 -13
- package/dist/esm/create-editor/create-schema.js +2 -31
- package/dist/esm/create-editor/createErrorReporter.js +8 -0
- package/dist/esm/create-editor/createPMPlugins.js +32 -0
- package/dist/esm/create-editor/fixExcludes.js +16 -0
- package/dist/esm/create-editor/getScrollGutterOptions.js +13 -0
- package/dist/esm/create-editor/sortByRank.js +3 -0
- package/dist/esm/entry-points/test-utils.js +3 -1
- package/dist/esm/isElementBySelectorInDocument.js +9 -0
- package/dist/esm/setTextSelection.js +6 -0
- package/dist/esm/test-utils.js +0 -16
- package/dist/esm/ui/Addon/checkForModal.js +19 -0
- package/dist/esm/ui/Addon/click-area-helper.js +2 -49
- package/dist/esm/ui/Addon/outsideProsemirrorEditorClickHandler.js +29 -0
- package/dist/esm/ui/Appearance/Chromeless.js +2 -14
- package/dist/esm/ui/Appearance/ChromelessEditorContainer.js +14 -0
- package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +7 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -1
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +1 -14
- package/dist/esm/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +7 -0
- package/dist/esm/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +7 -0
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +18 -21
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +11 -11
- package/dist/esm/ui/EditorContentContainer/styles/mentions.js +19 -0
- package/dist/esm/utils/combineQuickInsertProviders.js +10 -0
- package/dist/esm/utils/extensions.js +0 -10
- package/dist/esm/utils/getNodesVisibleInViewport.js +1 -9
- package/dist/esm/utils/isNodeVisible.js +9 -0
- package/dist/esm/utils/prepare-quick-insert-provider.js +2 -1
- package/dist/esm/utils/validNode.js +8 -0
- package/dist/esm/utils/validateNodes.js +1 -8
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/actions/isEmptyParagraph.d.ts +5 -0
- package/dist/types/actions/temp-is-empty-document.d.ts +0 -4
- package/dist/types/composable-editor/BaseThemeWrapper.d.ts +1 -1
- package/dist/types/composable-editor/editor-internal-compiled.d.ts +2 -1
- package/dist/types/composable-editor/editor-internal-emotion.d.ts +2 -1
- package/dist/types/composable-editor/editor-internal.d.ts +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +2 -2
- package/dist/types/create-editor/addMetadataAttributes.d.ts +16 -0
- package/dist/types/create-editor/create-editor.d.ts +1 -17
- package/dist/types/create-editor/create-plugins-list.d.ts +1 -4
- package/dist/types/create-editor/create-schema.d.ts +0 -15
- package/dist/types/create-editor/create-universal-preset.d.ts +1 -1
- package/dist/types/create-editor/createErrorReporter.d.ts +3 -0
- package/dist/types/create-editor/createPMPlugins.d.ts +3 -0
- package/dist/types/create-editor/fixExcludes.d.ts +6 -0
- package/dist/types/create-editor/get-ui-component.d.ts +1 -1
- package/dist/types/create-editor/getScrollGutterOptions.d.ts +3 -0
- package/dist/types/create-editor/sortByRank.d.ts +5 -0
- package/dist/types/editor.d.ts +1 -1
- package/dist/types/entry-points/editor.d.ts +10 -1
- package/dist/types/entry-points/test-utils.d.ts +5 -2
- package/dist/types/index.d.ts +3 -1
- package/dist/types/isElementBySelectorInDocument.d.ts +7 -0
- package/dist/types/presets/universal.d.ts +1 -2
- package/dist/types/setTextSelection.d.ts +2 -0
- package/dist/types/test-utils.d.ts +1 -10
- package/dist/types/types/with-appearance-component.d.ts +1 -1
- package/dist/types/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +1 -1
- package/dist/types/ui/Addon/checkForModal.d.ts +10 -0
- package/dist/types/ui/Addon/click-area-helper.d.ts +0 -11
- package/dist/types/ui/Addon/outsideProsemirrorEditorClickHandler.d.ts +2 -0
- package/dist/types/ui/Appearance/Chromeless.d.ts +2 -10
- package/dist/types/ui/Appearance/ChromelessEditorContainer.d.ts +9 -0
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +4 -0
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -10
- package/dist/types/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +4 -0
- package/dist/types/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +4 -0
- package/dist/types/utils/combineQuickInsertProviders.d.ts +2 -0
- package/dist/types/utils/extensions.d.ts +0 -1
- package/dist/types/utils/getNodesVisibleInViewport.d.ts +0 -5
- package/dist/types/utils/isNodeVisible.d.ts +5 -0
- package/dist/types/utils/validNode.d.ts +2 -0
- package/dist/types/utils/validateNodes.d.ts +0 -1
- package/dist/types-ts4.5/actions/isEmptyParagraph.d.ts +5 -0
- package/dist/types-ts4.5/actions/temp-is-empty-document.d.ts +0 -4
- package/dist/types-ts4.5/composable-editor/BaseThemeWrapper.d.ts +1 -1
- package/dist/types-ts4.5/composable-editor/editor-internal-compiled.d.ts +2 -1
- package/dist/types-ts4.5/composable-editor/editor-internal-emotion.d.ts +2 -1
- package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +2 -2
- package/dist/types-ts4.5/create-editor/addMetadataAttributes.d.ts +16 -0
- package/dist/types-ts4.5/create-editor/create-editor.d.ts +1 -17
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +1 -4
- package/dist/types-ts4.5/create-editor/create-schema.d.ts +0 -15
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/createErrorReporter.d.ts +3 -0
- package/dist/types-ts4.5/create-editor/createPMPlugins.d.ts +3 -0
- package/dist/types-ts4.5/create-editor/fixExcludes.d.ts +6 -0
- package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/getScrollGutterOptions.d.ts +3 -0
- package/dist/types-ts4.5/create-editor/sortByRank.d.ts +5 -0
- package/dist/types-ts4.5/editor.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/editor.d.ts +10 -1
- package/dist/types-ts4.5/entry-points/test-utils.d.ts +5 -2
- package/dist/types-ts4.5/index.d.ts +3 -1
- package/dist/types-ts4.5/isElementBySelectorInDocument.d.ts +7 -0
- package/dist/types-ts4.5/presets/universal.d.ts +1 -2
- package/dist/types-ts4.5/setTextSelection.d.ts +2 -0
- package/dist/types-ts4.5/test-utils.d.ts +1 -10
- package/dist/types-ts4.5/types/with-appearance-component.d.ts +1 -1
- package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +1 -1
- package/dist/types-ts4.5/ui/Addon/checkForModal.d.ts +10 -0
- package/dist/types-ts4.5/ui/Addon/click-area-helper.d.ts +0 -11
- package/dist/types-ts4.5/ui/Addon/outsideProsemirrorEditorClickHandler.d.ts +2 -0
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +2 -10
- package/dist/types-ts4.5/ui/Appearance/ChromelessEditorContainer.d.ts +9 -0
- package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +4 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbar.d.ts +0 -10
- package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +4 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +4 -0
- package/dist/types-ts4.5/utils/combineQuickInsertProviders.d.ts +2 -0
- package/dist/types-ts4.5/utils/extensions.d.ts +0 -1
- package/dist/types-ts4.5/utils/getNodesVisibleInViewport.d.ts +0 -5
- package/dist/types-ts4.5/utils/isNodeVisible.d.ts +5 -0
- package/dist/types-ts4.5/utils/validNode.d.ts +2 -0
- package/dist/types-ts4.5/utils/validateNodes.d.ts +0 -1
- package/package.json +16 -16
- package/dist/cjs/types/index.js +0 -1
- package/dist/es2019/types/index.js +0 -0
- package/dist/esm/types/index.js +0 -0
- package/dist/types/types/index.d.ts +0 -9
- package/dist/types-ts4.5/types/index.d.ts +0 -9
|
@@ -2,21 +2,6 @@ import type { MarkConfig, NodeConfig } from '@atlaskit/editor-common/types';
|
|
|
2
2
|
import type { DOMOutputSpec, MarkSpec, NodeSpec, Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
type toDOMType = (node: PMNode | PMMark) => DOMOutputSpec;
|
|
5
|
-
/**
|
|
6
|
-
* 🧱 Internal Helper Function: Editor FE Platform
|
|
7
|
-
*
|
|
8
|
-
* Adds generic metadata attributes to a DOMOutputSpec array based on the provided node or mark.
|
|
9
|
-
* This function ensures that the DOMOutputSpec is annotated with ProseMirror-specific metadata.
|
|
10
|
-
*
|
|
11
|
-
* @param {object} params - Parameters object.
|
|
12
|
-
* @param {PMNode | PMMark} params.nodeOrMark - The ProseMirror node or mark to extract metadata from.
|
|
13
|
-
* @param {DOMOutputSpec} params.domSpec - The DOMOutputSpec to which attributes will be added.
|
|
14
|
-
* @returns {DOMOutputSpec} The modified DOMOutputSpec with additional metadata.
|
|
15
|
-
*/
|
|
16
|
-
export declare const addMetadataAttributes: ({ nodeOrMark, domSpec, }: {
|
|
17
|
-
domSpec: DOMOutputSpec;
|
|
18
|
-
nodeOrMark: PMNode | PMMark;
|
|
19
|
-
}) => DOMOutputSpec;
|
|
20
5
|
/**
|
|
21
6
|
* 🧱 Internal Helper Function: Editor FE Platform
|
|
22
7
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InitialPluginConfiguration } from '../presets/universal';
|
|
2
|
-
import type { EditorProps } from '../types';
|
|
2
|
+
import type { EditorProps } from '../types/editor-props';
|
|
3
3
|
export declare function createUniversalPreset({ props, prevProps, initialPluginConfiguration, }: {
|
|
4
4
|
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
5
5
|
prevProps?: EditorProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { EditorAppearanceComponentProps } from '../types';
|
|
2
|
+
import type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
|
|
3
3
|
type ReturnType = React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<any[]>>>;
|
|
4
4
|
export default function getUiComponent(appearance: EditorAppearance): ReturnType;
|
|
5
5
|
export {};
|
package/dist/types/editor.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import React from 'react';
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import type { InitialPluginConfiguration } from './preset-universal';
|
|
8
8
|
import type { EditorProps } from './types/editor-props';
|
|
9
|
-
export type { Command, CommandDispatch, DomAtPos, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorProps, ExtensionConfig, ExtensionProvidersProp, MessageDescriptor, PMPluginCreateConfig, } from './types';
|
|
10
9
|
interface EditorPropsWithInitialPluginConfiguration extends EditorProps {
|
|
11
10
|
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
12
11
|
}
|
|
@@ -22,3 +21,4 @@ export default class Editor extends React.Component<EditorPropsWithInitialPlugin
|
|
|
22
21
|
constructor(props: EditorPropsWithInitialPluginConfiguration);
|
|
23
22
|
render(): jsx.JSX.Element;
|
|
24
23
|
}
|
|
24
|
+
export {};
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
export type { Command, CommandDispatch
|
|
1
|
+
export type { Command, CommandDispatch } from '../types/command';
|
|
2
|
+
export type { DomAtPos } from '../types/dom-at-pos';
|
|
3
|
+
export type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
|
|
4
|
+
export type { EditorConfig } from '../types/editor-config';
|
|
5
|
+
export type { EditorInstance } from '../types/editor-instance';
|
|
6
|
+
export type { EditorProps } from '../types/editor-props';
|
|
7
|
+
export type { ExtensionConfig } from '../types/extension-config';
|
|
8
|
+
export type { ExtensionProvidersProp } from '../types/editor-props';
|
|
9
|
+
export type { MessageDescriptor } from '../types/i18n';
|
|
10
|
+
export type { PMPluginCreateConfig } from '../types/pm-plugin-list';
|
|
2
11
|
export { default } from '../editor';
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
1
|
+
export { isElementBySelectorInDocument } from '../isElementBySelectorInDocument';
|
|
2
|
+
export { setTextSelection } from '../setTextSelection';
|
|
3
|
+
export { createPMSchemaAndPlugins } from '../test-utils';
|
|
4
|
+
export type { LightEditorConfig } from '../test-utils';
|
|
5
|
+
export type { LightEditorPlugin } from '../create-editor/get-plugins';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,7 +26,9 @@ ContextPanel, } from './ui/ContextPanel';
|
|
|
26
26
|
export { getNodesCount } from './utils/getNodesCount';
|
|
27
27
|
export { default as measurements } from './utils/performance/measure-enum';
|
|
28
28
|
export { createFeatureFlagsFromProps } from './utils/feature-flags-from-props';
|
|
29
|
-
export type {
|
|
29
|
+
export type { EditorInstance } from './types/editor-instance';
|
|
30
|
+
export type { Command, CommandDispatch } from './types/command';
|
|
31
|
+
export type { EditorProps } from './types/editor-props';
|
|
30
32
|
export { default as EditorActions } from './actions';
|
|
31
33
|
export { getDefaultPresetOptionsFromEditorProps } from './create-editor/create-plugins-list';
|
|
32
34
|
export { ReactEditorView } from './create-editor/ReactEditorView';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Given a selector, checks if an element matching the selector exists in the
|
|
3
|
+
* document.
|
|
4
|
+
* @param selector
|
|
5
|
+
* @returns true if element matching selector exists in document, false otherwise
|
|
6
|
+
*/
|
|
7
|
+
export declare const isElementBySelectorInDocument: (selector: string) => boolean;
|
|
@@ -4,8 +4,7 @@ import type { EditorAppearance, FeatureFlags } from '@atlaskit/editor-common/typ
|
|
|
4
4
|
import type { ToolbarInsertBlockButtonsConfig } from '@atlaskit/editor-plugin-insert-block';
|
|
5
5
|
import type { ExtensionPluginOptions } from '@atlaskit/editor-plugins/extension';
|
|
6
6
|
import type { BreakpointPreset } from '@atlaskit/editor-toolbar';
|
|
7
|
-
import type { EditorProps } from '../types';
|
|
8
|
-
import type { EditorPluginFeatureProps, EditorProviderProps, EditorSharedPropsWithPlugins } from '../types/editor-props';
|
|
7
|
+
import type { EditorPluginFeatureProps, EditorProps, EditorProviderProps, EditorSharedPropsWithPlugins } from '../types/editor-props';
|
|
9
8
|
import type { DefaultPresetPluginOptions } from './default';
|
|
10
9
|
export type UniversalPresetProps = DefaultPresetPluginOptions & EditorSharedPropsWithPlugins & Omit<EditorPluginFeatureProps, 'placeholder'> & EditorProviderProps;
|
|
11
10
|
/**
|
|
@@ -3,9 +3,7 @@ import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
|
3
3
|
import type { MarkConfig, NodeConfig, ReactHookFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { Plugin } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
6
|
import type { LightPMPlugin, LightPMPluginFactoryParams, OnEditorViewStateUpdated } from './create-editor/get-plugins';
|
|
8
|
-
export type { LightEditorPlugin } from './create-editor/get-plugins';
|
|
9
7
|
export interface LightEditorConfig {
|
|
10
8
|
contentComponents: UIComponentFactory[];
|
|
11
9
|
marks: MarkConfig[];
|
|
@@ -23,11 +21,4 @@ type PluginData = {
|
|
|
23
21
|
export declare const createPMSchemaAndPlugins: (inputPreset?: EditorPresetBuilder) => (pluginFactoryParams: Omit<LightPMPluginFactoryParams, "schema"> & {
|
|
24
22
|
pluginInjectionAPI: EditorPluginInjectionAPI;
|
|
25
23
|
}) => PluginData;
|
|
26
|
-
export
|
|
27
|
-
/**
|
|
28
|
-
* Given a selector, checks if an element matching the selector exists in the
|
|
29
|
-
* document.
|
|
30
|
-
* @param selector
|
|
31
|
-
* @returns true if element matching selector exists in document, false otherwise
|
|
32
|
-
*/
|
|
33
|
-
export declare const isElementBySelectorInDocument: (selector: string) => boolean;
|
|
24
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { EditorAppearanceComponentProps } from '../types';
|
|
2
|
+
import type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
|
|
3
3
|
export type WithAppearanceComponent = {
|
|
4
4
|
AppearanceComponent: React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<NextEditorPlugin<any, any>[]>>>;
|
|
5
5
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see ED-14699 - check if editor is inside a modal to continue to bring cursor to input when
|
|
3
|
+
* any part of the editor container is clicked
|
|
4
|
+
*
|
|
5
|
+
* Handles two cases when a click event is fired:
|
|
6
|
+
*
|
|
7
|
+
* 1. if editor (e.g. comment inside of Jira ticket view) is inside modal then ensure focus and cursor is brought to the input
|
|
8
|
+
* 2. if another modal is open (e.g. delete confirmation modal for confluence table) then ignore clicks as they shouldn't influence editor state
|
|
9
|
+
*/
|
|
10
|
+
export declare const checkForModal: (target: HTMLElement | null) => boolean;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
/**
|
|
3
|
-
* @see ED-14699 - check if editor is inside a modal to continue to bring cursor to input when
|
|
4
|
-
* any part of the editor container is clicked
|
|
5
|
-
*
|
|
6
|
-
* Handles two cases when a click event is fired:
|
|
7
|
-
*
|
|
8
|
-
* 1. if editor (e.g. comment inside of Jira ticket view) is inside modal then ensure focus and cursor is brought to the input
|
|
9
|
-
* 2. if another modal is open (e.g. delete confirmation modal for confluence table) then ignore clicks as they shouldn't influence editor state
|
|
10
|
-
*/
|
|
11
|
-
export declare const checkForModal: (target: HTMLElement | null) => boolean;
|
|
12
2
|
declare const clickAreaClickHandler: (view: EditorView, event: React.MouseEvent<HTMLElement>) => boolean | void;
|
|
13
|
-
export declare const outsideProsemirrorEditorClickHandler: (view: EditorView, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
14
3
|
export { clickAreaClickHandler };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
4
4
|
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
5
|
-
import type { EditorAppearanceComponentProps } from '../../types';
|
|
6
|
-
import { type ChromelessEditorContainerProps } from './Chromeless-emotion';
|
|
5
|
+
import type { EditorAppearanceComponentProps } from '../../types/editor-appearance-component';
|
|
7
6
|
type AppearanceProps = EditorAppearanceComponentProps<[
|
|
8
7
|
OptionalPlugin<MaxContentSizePlugin>,
|
|
9
8
|
OptionalPlugin<EditorViewModePlugin>
|
|
@@ -20,11 +19,4 @@ export default class Editor extends React.Component<AppearanceProps> {
|
|
|
20
19
|
private renderChrome;
|
|
21
20
|
render(): React.JSX.Element;
|
|
22
21
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Container for the chromeless editor appearance. This is used to set the max and min height
|
|
25
|
-
* of the editor content area, and to provide a ref to the container element for the popups.
|
|
26
|
-
* @param param0 props for the chromeless editor container
|
|
27
|
-
* @returns JSX element representing the chromeless editor container
|
|
28
|
-
*/
|
|
29
|
-
export declare const ChromelessEditorContainer: FC<ChromelessEditorContainerProps & ChromelessEditorContainerProps>;
|
|
30
22
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type ChromelessEditorContainerProps } from './Chromeless-emotion';
|
|
3
|
+
/**
|
|
4
|
+
* Container for the chromeless editor appearance. This is used to set the max and min height
|
|
5
|
+
* of the editor content area, and to provide a ref to the container element for the popups.
|
|
6
|
+
* @param param0 props for the chromeless editor container
|
|
7
|
+
* @returns JSX element representing the chromeless editor container
|
|
8
|
+
*/
|
|
9
|
+
export declare const ChromelessEditorContainer: FC<ChromelessEditorContainerProps & ChromelessEditorContainerProps>;
|
|
@@ -5,7 +5,7 @@ import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-
|
|
|
5
5
|
import type { MediaPlugin } from '@atlaskit/editor-plugins/media';
|
|
6
6
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
7
7
|
import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
|
|
8
|
-
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
8
|
+
import type { EditorAppearanceComponentProps } from '../../../types/editor-appearance-component';
|
|
9
9
|
type ComponentProps = EditorAppearanceComponentProps<[
|
|
10
10
|
OptionalPlugin<MediaPlugin>,
|
|
11
11
|
OptionalPlugin<MaxContentSizePlugin>,
|
|
@@ -5,7 +5,7 @@ import type { InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
|
|
|
5
5
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
6
6
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
|
|
7
7
|
import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
|
|
8
|
-
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
8
|
+
import type { EditorAppearanceComponentProps } from '../../../types/editor-appearance-component';
|
|
9
9
|
import type { ToolbarEditorPlugins } from './FullPageToolbar';
|
|
10
10
|
export type ComponentProps = EditorAppearanceComponentProps<[
|
|
11
11
|
OptionalPlugin<EditorViewModePlugin>,
|
|
@@ -15,7 +15,7 @@ import type { ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel'
|
|
|
15
15
|
import type { ViewMode } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
16
16
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
17
17
|
import type EditorActions from '../../../actions';
|
|
18
|
-
import type { ContentComponents, ReactComponents } from '../../../types';
|
|
18
|
+
import type { ContentComponents, ReactComponents } from '../../../types/editor-props';
|
|
19
19
|
import type { MarkdownModePlugin } from '../../../types/markdown-mode';
|
|
20
20
|
import type { ScrollContainerRefs } from './types';
|
|
21
21
|
type EditorAPI = PublicPluginAPI<[
|
|
@@ -14,7 +14,7 @@ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugins/feature-flags'
|
|
|
14
14
|
import type { FindReplacePlugin } from '@atlaskit/editor-plugins/find-replace';
|
|
15
15
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
16
16
|
import type { EditorActions } from '../../../index';
|
|
17
|
-
import type { PrimaryToolbarComponents } from '../../../types';
|
|
17
|
+
import type { PrimaryToolbarComponents } from '../../../types/editor-props';
|
|
18
18
|
export type ToolbarEditorPlugins = [
|
|
19
19
|
OptionalPlugin<AnalyticsPlugin>,
|
|
20
20
|
OptionalPlugin<FindReplacePlugin>,
|
|
@@ -7,7 +7,7 @@ import React from 'react';
|
|
|
7
7
|
import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
8
8
|
import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
-
import type { PrimaryToolbarComponents } from '../../../types';
|
|
10
|
+
import type { PrimaryToolbarComponents } from '../../../types/editor-props';
|
|
11
11
|
import type { MarkdownModePlugin } from '../../../types/markdown-mode';
|
|
12
12
|
type FullPageToolbarNextProps = {
|
|
13
13
|
beforeIcon?: React.ReactNode;
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
1
|
export declare const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
3
|
-
export declare const NonCustomToolbarWrapperMigration: React.ComponentType<{
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}>;
|
|
6
|
-
export declare const CustomToolbarWrapperMigration: React.ComponentType<{
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
}>;
|
|
9
|
-
export declare const MainToolbarIconBeforeMigration: React.ComponentType<{
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
}>;
|
|
@@ -6,4 +6,3 @@ import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
|
6
6
|
import type { ExtensionPlugin } from '@atlaskit/editor-plugins/extension';
|
|
7
7
|
import type EditorActions from '../actions';
|
|
8
8
|
export declare function extensionProviderToQuickInsertProvider(extensionProvider: ExtensionProvider, editorActions: EditorActions, apiRef: React.MutableRefObject<PublicPluginAPI<[ExtensionPlugin]> | undefined>, createAnalyticsEvent?: CreateUIAnalyticsEvent): Promise<QuickInsertProvider>;
|
|
9
|
-
export declare function combineQuickInsertProviders(quickInsertProviders: Array<QuickInsertProvider | Promise<QuickInsertProvider>>): QuickInsertProvider;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if a DOM element is visible within the viewport. We deem a node visible if the top left corner coordinate is within the viewport.
|
|
3
|
-
* This may not look visible, and may include a node that looks below the fold – but it's more than 0 pixels within the viewport.
|
|
4
|
-
*/
|
|
5
|
-
export declare const isNodeVisible: (node: Element) => boolean;
|
|
6
1
|
/**
|
|
7
2
|
* Get visible nodes in viewport by looping through the first N nodes (MAX_NODES_TO_COUNT)
|
|
8
3
|
* in the editor DOM and counting the node types that are visible.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a DOM element is visible within the viewport. We deem a node visible if the top left corner coordinate is within the viewport.
|
|
3
|
+
* This may not look visible, and may include a node that looks below the fold – but it's more than 0 pixels within the viewport.
|
|
4
|
+
*/
|
|
5
|
+
export declare const isNodeVisible: (node: Element) => boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
export declare const validNode: (node: PMNode) => boolean;
|
|
3
2
|
/** Validates prosemirror nodes, and returns true only if all nodes are valid */
|
|
4
3
|
export declare const validateNodes: (nodes: PMNode[]) => boolean;
|
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
* help decouple it from editor-common
|
|
6
6
|
*/
|
|
7
7
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
-
/**
|
|
9
|
-
* Checks if node is an empty paragraph.
|
|
10
|
-
*/
|
|
11
|
-
export declare function isEmptyParagraph(node?: Node | null): boolean;
|
|
12
8
|
/**
|
|
13
9
|
* Checks if a node looks like an empty document
|
|
14
10
|
*/
|
|
@@ -3,5 +3,5 @@ type BaseThemeProps = {
|
|
|
3
3
|
baseFontSize?: number;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export declare
|
|
6
|
+
export declare const BaseThemeWrapper: React.ComponentType<BaseThemeProps>;
|
|
7
7
|
export {};
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* Cleanup: delete this file once the experiment has shipped.
|
|
10
10
|
*/
|
|
11
11
|
import type { ReactNode } from 'react';
|
|
12
|
-
export declare const EditorInternalContainerCompiled: ({ children }: {
|
|
12
|
+
export declare const EditorInternalContainerCompiled: ({ children, fontSize, }: {
|
|
13
13
|
children?: ReactNode;
|
|
14
|
+
fontSize?: number;
|
|
14
15
|
}) => React.JSX.Element;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* Cleanup: delete this file once the experiment has shipped.
|
|
10
10
|
*/
|
|
11
11
|
import type { ReactNode } from 'react';
|
|
12
|
-
export declare const EditorInternalContainerEmotion: ({ children }: {
|
|
12
|
+
export declare const EditorInternalContainerEmotion: ({ children, fontSize, }: {
|
|
13
13
|
children?: ReactNode;
|
|
14
|
+
fontSize?: number;
|
|
14
15
|
}) => React.JSX.Element;
|
|
@@ -8,7 +8,7 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
8
8
|
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import type EditorActions from '../actions';
|
|
11
|
-
import type { EditorAppearanceComponentProps } from '../types';
|
|
11
|
+
import type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
|
|
12
12
|
import type { EditorNextProps } from '../types/editor-props';
|
|
13
13
|
interface InternalProps {
|
|
14
14
|
AppearanceComponent: React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<[
|
|
@@ -8,8 +8,8 @@ import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/
|
|
|
8
8
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
9
9
|
import type { PublicPluginAPI, Transformer } from '@atlaskit/editor-common/types';
|
|
10
10
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
|
-
import type { EditorConfig
|
|
12
|
-
import type { EditorNextProps } from '../types/editor-props';
|
|
11
|
+
import type { EditorConfig } from '../types/editor-config';
|
|
12
|
+
import type { EditorNextProps, EditorProps } from '../types/editor-props';
|
|
13
13
|
export interface EditorViewProps extends WrappedComponentProps {
|
|
14
14
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
15
15
|
disabled?: boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DOMOutputSpec, Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
/**
|
|
3
|
+
* 🧱 Internal Helper Function: Editor FE Platform
|
|
4
|
+
*
|
|
5
|
+
* Adds generic metadata attributes to a DOMOutputSpec array based on the provided node or mark.
|
|
6
|
+
* This function ensures that the DOMOutputSpec is annotated with ProseMirror-specific metadata.
|
|
7
|
+
*
|
|
8
|
+
* @param {object} params - Parameters object.
|
|
9
|
+
* @param {PMNode | PMMark} params.nodeOrMark - The ProseMirror node or mark to extract metadata from.
|
|
10
|
+
* @param {DOMOutputSpec} params.domSpec - The DOMOutputSpec to which attributes will be added.
|
|
11
|
+
* @returns {DOMOutputSpec} The modified DOMOutputSpec with additional metadata.
|
|
12
|
+
*/
|
|
13
|
+
export declare const addMetadataAttributes: ({ nodeOrMark, domSpec, }: {
|
|
14
|
+
domSpec: DOMOutputSpec;
|
|
15
|
+
nodeOrMark: PMNode | PMMark;
|
|
16
|
+
}) => DOMOutputSpec;
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
import type { ErrorReportingHandler } from '@atlaskit/editor-common/error-reporter';
|
|
2
|
-
import { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
|
|
3
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
1
|
import type { EditorPlugin } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type {
|
|
6
|
-
import type { EditorConfig, PMPluginCreateConfig } from '../types';
|
|
7
|
-
export declare function sortByRank(a: {
|
|
8
|
-
rank: number;
|
|
9
|
-
}, b: {
|
|
10
|
-
rank: number;
|
|
11
|
-
}): number;
|
|
12
|
-
export declare function fixExcludes(marks: {
|
|
13
|
-
[key: string]: MarkSpec;
|
|
14
|
-
}): {
|
|
15
|
-
[key: string]: MarkSpec;
|
|
16
|
-
};
|
|
2
|
+
import type { EditorConfig } from '../types/editor-config';
|
|
17
3
|
export declare function processPluginsList(plugins: EditorPlugin[]): EditorConfig;
|
|
18
|
-
export declare function createPMPlugins(config: PMPluginCreateConfig): SafePlugin[];
|
|
19
|
-
export declare function createErrorReporter(errorReporterHandler?: ErrorReportingHandler): ErrorReporter;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
2
2
|
import type { EditorPluginInjectionAPI, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
3
3
|
import type { EditorPlugin } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugins/base';
|
|
5
4
|
import type { DefaultPresetPluginOptions } from '../../src/presets/default';
|
|
6
|
-
import type { EditorProps } from '../types';
|
|
7
|
-
import type { EditorPluginFeatureProps } from '../types/editor-props';
|
|
8
|
-
export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
|
|
5
|
+
import type { EditorPluginFeatureProps, EditorProps } from '../types/editor-props';
|
|
9
6
|
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): DefaultPresetPluginOptions & Omit<EditorPluginFeatureProps, 'placeholder'>;
|
|
10
7
|
/**
|
|
11
8
|
* Maps EditorProps to EditorPlugins
|
|
@@ -2,21 +2,6 @@ import type { MarkConfig, NodeConfig } from '@atlaskit/editor-common/types';
|
|
|
2
2
|
import type { DOMOutputSpec, MarkSpec, NodeSpec, Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
type toDOMType = (node: PMNode | PMMark) => DOMOutputSpec;
|
|
5
|
-
/**
|
|
6
|
-
* 🧱 Internal Helper Function: Editor FE Platform
|
|
7
|
-
*
|
|
8
|
-
* Adds generic metadata attributes to a DOMOutputSpec array based on the provided node or mark.
|
|
9
|
-
* This function ensures that the DOMOutputSpec is annotated with ProseMirror-specific metadata.
|
|
10
|
-
*
|
|
11
|
-
* @param {object} params - Parameters object.
|
|
12
|
-
* @param {PMNode | PMMark} params.nodeOrMark - The ProseMirror node or mark to extract metadata from.
|
|
13
|
-
* @param {DOMOutputSpec} params.domSpec - The DOMOutputSpec to which attributes will be added.
|
|
14
|
-
* @returns {DOMOutputSpec} The modified DOMOutputSpec with additional metadata.
|
|
15
|
-
*/
|
|
16
|
-
export declare const addMetadataAttributes: ({ nodeOrMark, domSpec, }: {
|
|
17
|
-
domSpec: DOMOutputSpec;
|
|
18
|
-
nodeOrMark: PMNode | PMMark;
|
|
19
|
-
}) => DOMOutputSpec;
|
|
20
5
|
/**
|
|
21
6
|
* 🧱 Internal Helper Function: Editor FE Platform
|
|
22
7
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InitialPluginConfiguration } from '../presets/universal';
|
|
2
|
-
import type { EditorProps } from '../types';
|
|
2
|
+
import type { EditorProps } from '../types/editor-props';
|
|
3
3
|
export declare function createUniversalPreset({ props, prevProps, initialPluginConfiguration, }: {
|
|
4
4
|
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
5
5
|
prevProps?: EditorProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { EditorAppearanceComponentProps } from '../types';
|
|
2
|
+
import type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
|
|
3
3
|
type ReturnType = React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<any[]>>>;
|
|
4
4
|
export default function getUiComponent(appearance: EditorAppearance): ReturnType;
|
|
5
5
|
export {};
|
|
@@ -6,7 +6,6 @@ import React from 'react';
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import type { InitialPluginConfiguration } from './preset-universal';
|
|
8
8
|
import type { EditorProps } from './types/editor-props';
|
|
9
|
-
export type { Command, CommandDispatch, DomAtPos, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorProps, ExtensionConfig, ExtensionProvidersProp, MessageDescriptor, PMPluginCreateConfig, } from './types';
|
|
10
9
|
interface EditorPropsWithInitialPluginConfiguration extends EditorProps {
|
|
11
10
|
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
12
11
|
}
|
|
@@ -22,3 +21,4 @@ export default class Editor extends React.Component<EditorPropsWithInitialPlugin
|
|
|
22
21
|
constructor(props: EditorPropsWithInitialPluginConfiguration);
|
|
23
22
|
render(): jsx.JSX.Element;
|
|
24
23
|
}
|
|
24
|
+
export {};
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
export type { Command, CommandDispatch
|
|
1
|
+
export type { Command, CommandDispatch } from '../types/command';
|
|
2
|
+
export type { DomAtPos } from '../types/dom-at-pos';
|
|
3
|
+
export type { EditorAppearanceComponentProps } from '../types/editor-appearance-component';
|
|
4
|
+
export type { EditorConfig } from '../types/editor-config';
|
|
5
|
+
export type { EditorInstance } from '../types/editor-instance';
|
|
6
|
+
export type { EditorProps } from '../types/editor-props';
|
|
7
|
+
export type { ExtensionConfig } from '../types/extension-config';
|
|
8
|
+
export type { ExtensionProvidersProp } from '../types/editor-props';
|
|
9
|
+
export type { MessageDescriptor } from '../types/i18n';
|
|
10
|
+
export type { PMPluginCreateConfig } from '../types/pm-plugin-list';
|
|
2
11
|
export { default } from '../editor';
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
1
|
+
export { isElementBySelectorInDocument } from '../isElementBySelectorInDocument';
|
|
2
|
+
export { setTextSelection } from '../setTextSelection';
|
|
3
|
+
export { createPMSchemaAndPlugins } from '../test-utils';
|
|
4
|
+
export type { LightEditorConfig } from '../test-utils';
|
|
5
|
+
export type { LightEditorPlugin } from '../create-editor/get-plugins';
|