@atlaskit/editor-core 189.3.2 → 189.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/plugins/code-block/actions.js +1 -1
- package/dist/cjs/plugins/code-block/ide-ux/line-handling.js +1 -1
- package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +1 -1
- package/dist/cjs/plugins/code-block/pm-plugins/keymaps.js +7 -4
- package/dist/cjs/plugins/code-block/toolbar.js +5 -3
- package/dist/cjs/plugins/code-block/utils.js +5 -1
- package/dist/cjs/plugins/expand/index.js +3 -3
- package/dist/cjs/plugins/feedback-dialog/index.js +3 -3
- package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +2 -2
- package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarTask/index.js +2 -2
- package/dist/cjs/{plugins/code-block/styles.js → ui/ContentStyles/code-block.js} +1 -2
- package/dist/cjs/ui/ContentStyles/index.js +7 -7
- package/dist/cjs/utils/deprecation-warnings.js +1 -3
- package/dist/cjs/utils/editorDeprecationWarnings.js +2 -4
- package/dist/cjs/utils/index.js +0 -53
- package/dist/cjs/version-wrapper.js +2 -5
- package/dist/es2019/plugins/code-block/actions.js +1 -1
- package/dist/es2019/plugins/code-block/ide-ux/line-handling.js +1 -1
- package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +1 -1
- package/dist/es2019/plugins/code-block/pm-plugins/keymaps.js +5 -2
- package/dist/es2019/plugins/code-block/toolbar.js +1 -2
- package/dist/es2019/plugins/code-block/utils.js +4 -1
- package/dist/es2019/plugins/expand/index.js +1 -1
- package/dist/es2019/plugins/feedback-dialog/index.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarTask/index.js +1 -1
- package/dist/es2019/{plugins/code-block/styles.js → ui/ContentStyles/code-block.js} +5 -6
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/utils/deprecation-warnings.js +1 -3
- package/dist/es2019/utils/editorDeprecationWarnings.js +2 -4
- package/dist/es2019/utils/index.js +0 -36
- package/dist/es2019/version-wrapper.js +1 -4
- package/dist/esm/plugins/code-block/actions.js +1 -1
- package/dist/esm/plugins/code-block/ide-ux/line-handling.js +1 -1
- package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +1 -1
- package/dist/esm/plugins/code-block/pm-plugins/keymaps.js +5 -2
- package/dist/esm/plugins/code-block/toolbar.js +1 -2
- package/dist/esm/plugins/code-block/utils.js +4 -1
- package/dist/esm/plugins/expand/index.js +1 -1
- package/dist/esm/plugins/feedback-dialog/index.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarTask/index.js +1 -1
- package/dist/esm/{plugins/code-block/styles.js → ui/ContentStyles/code-block.js} +2 -3
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/utils/deprecation-warnings.js +1 -3
- package/dist/esm/utils/editorDeprecationWarnings.js +2 -4
- package/dist/esm/utils/index.js +0 -50
- package/dist/esm/version-wrapper.js +1 -4
- package/dist/types/plugins/code-block/actions.d.ts +1 -1
- package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +1 -1
- package/dist/types/plugins/code-block/pm-plugins/ide-ux.d.ts +1 -1
- package/dist/types/plugins/code-block/pm-plugins/main.d.ts +2 -2
- package/dist/types/plugins/code-block/types.d.ts +1 -2
- package/dist/types/plugins/code-block/utils.d.ts +3 -0
- package/dist/{types-ts4.5/plugins/code-block/styles.d.ts → types/ui/ContentStyles/code-block.d.ts} +1 -1
- package/dist/types/utils/index.d.ts +2 -18
- package/dist/types/version-wrapper.d.ts +0 -1
- package/dist/types-ts4.5/plugins/code-block/actions.d.ts +1 -1
- package/dist/types-ts4.5/plugins/code-block/nodeviews/code-block.d.ts +1 -1
- package/dist/types-ts4.5/plugins/code-block/pm-plugins/ide-ux.d.ts +1 -1
- package/dist/types-ts4.5/plugins/code-block/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/plugins/code-block/types.d.ts +1 -2
- package/dist/types-ts4.5/plugins/code-block/utils.d.ts +3 -0
- package/dist/{types/plugins/code-block/styles.d.ts → types-ts4.5/ui/ContentStyles/code-block.d.ts} +1 -1
- package/dist/types-ts4.5/utils/index.d.ts +2 -39
- package/dist/types-ts4.5/version-wrapper.d.ts +0 -1
- package/package.json +2 -5
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { nextMajorVersion } from '../version-wrapper';
|
|
2
1
|
const deprecationWarnings = (className, props, deprecations) => {
|
|
3
2
|
if (process.env.NODE_ENV === 'production') {
|
|
4
3
|
return;
|
|
5
4
|
}
|
|
6
|
-
const nextVersion = nextMajorVersion();
|
|
7
5
|
for (const deprecation of deprecations) {
|
|
8
6
|
const {
|
|
9
7
|
property,
|
|
@@ -14,7 +12,7 @@ const deprecationWarnings = (className, props, deprecations) => {
|
|
|
14
12
|
if (props.hasOwnProperty(property)) {
|
|
15
13
|
if (condition(props)) {
|
|
16
14
|
// eslint-disable-next-line no-console
|
|
17
|
-
console.warn(`${property} property for ${className} is deprecated. ${description} [Will be ${type} in editor-core
|
|
15
|
+
console.warn(`${property} property for ${className} is deprecated. ${description} [Will be ${type} in the next major editor-core version]`);
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
18
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { nextMajorVersion } from '../version-wrapper';
|
|
2
1
|
export default function editorDeprecationWarnings(props) {
|
|
3
2
|
if (process.env.NODE_ENV === 'production') {
|
|
4
3
|
return;
|
|
5
4
|
}
|
|
6
|
-
const nextVersion = nextMajorVersion();
|
|
7
5
|
const deprecatedProperties = {
|
|
8
6
|
allowTasksAndDecisions: {
|
|
9
7
|
message: 'To allow tasks and decisions use taskDecisionProvider – <Editor taskDecisionProvider={{ provider }} />',
|
|
@@ -24,11 +22,11 @@ export default function editorDeprecationWarnings(props) {
|
|
|
24
22
|
const type = meta.type || 'enabled by default';
|
|
25
23
|
|
|
26
24
|
// eslint-disable-next-line no-console
|
|
27
|
-
console.warn(`${property} property is deprecated. ${meta.message || ''} [Will be ${type} in editor-core
|
|
25
|
+
console.warn(`${property} property is deprecated. ${meta.message || ''} [Will be ${type} in the next major editor-core version]`);
|
|
28
26
|
}
|
|
29
27
|
});
|
|
30
28
|
if (props.hasOwnProperty('allowTables') && typeof props.allowTables !== 'boolean' && (!props.allowTables || !props.allowTables.advanced)) {
|
|
31
29
|
// eslint-disable-next-line no-console
|
|
32
|
-
console.warn(`Advanced table options are deprecated (except isHeaderRowRequired) to continue using advanced table features use - <Editor allowTables={{ advanced: true }} /> [Will be changed in editor-core
|
|
30
|
+
console.warn(`Advanced table options are deprecated (except isHeaderRowRequired) to continue using advanced table features use - <Editor allowTables={{ advanced: true }} /> [Will be changed in the next major editor-core version]`);
|
|
33
31
|
}
|
|
34
32
|
}
|
|
@@ -12,9 +12,6 @@ function isMarkTypeCompatibleWithMark(markType, mark) {
|
|
|
12
12
|
function isMarkTypeAllowedInNode(markType, state) {
|
|
13
13
|
return toggleMark(markType)(state);
|
|
14
14
|
}
|
|
15
|
-
export function getCursor(selection) {
|
|
16
|
-
return selection.$cursor || undefined;
|
|
17
|
-
}
|
|
18
15
|
|
|
19
16
|
/**
|
|
20
17
|
* Check if a mark is allowed at the current selection / cursor based on a given state.
|
|
@@ -104,39 +101,6 @@ export const isInsideBlockQuote = state => {
|
|
|
104
101
|
return hasParentNodeOfType(blockquote)(state.selection);
|
|
105
102
|
};
|
|
106
103
|
export { isTextSelection, isElementInTableCell, isLastItemMediaGroup, nonNullable } from '@atlaskit/editor-common/utils';
|
|
107
|
-
|
|
108
|
-
/** Helper type for single arg function */
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Compose 1 to n functions.
|
|
112
|
-
* @param func first function
|
|
113
|
-
* @param funcs additional functions
|
|
114
|
-
*/
|
|
115
|
-
export function compose(func, ...funcs) {
|
|
116
|
-
const allFuncs = [func, ...funcs];
|
|
117
|
-
return function composed(raw) {
|
|
118
|
-
return allFuncs.reduceRight((memo, func) => func(memo), raw);
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// one function
|
|
123
|
-
|
|
124
|
-
// two function
|
|
125
|
-
|
|
126
|
-
// three function
|
|
127
|
-
|
|
128
|
-
// If needed add more than 3 function
|
|
129
|
-
// Generic
|
|
130
|
-
// rest
|
|
131
|
-
export function pipe(...fns) {
|
|
132
|
-
if (fns.length === 0) {
|
|
133
|
-
return a => a;
|
|
134
|
-
}
|
|
135
|
-
if (fns.length === 1) {
|
|
136
|
-
return fns[0];
|
|
137
|
-
}
|
|
138
|
-
return fns.reduce((prevFn, nextFn) => (...args) => nextFn(prevFn(...args)));
|
|
139
|
-
}
|
|
140
104
|
export function sum(arr, f) {
|
|
141
105
|
return arr.reduce((val, x) => val + f(x), 0);
|
|
142
106
|
}
|
|
@@ -3,7 +3,7 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import { pluginKey } from './plugin-key';
|
|
4
4
|
import { copySelectionPluginKey } from './pm-plugins/codeBlockCopySelectionPlugin';
|
|
5
5
|
import { ACTIONS } from './pm-plugins/actions';
|
|
6
|
-
import { copyToClipboard } from '
|
|
6
|
+
import { copyToClipboard } from '@atlaskit/editor-common/clipboard';
|
|
7
7
|
import { shouldSplitSelectedNodeOnNodeInsertion } from '@atlaskit/editor-common/insert';
|
|
8
8
|
import { transformToCodeBlockAction } from './transform-to-code-block';
|
|
9
9
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCursor } from '
|
|
1
|
+
import { getCursor } from '../utils';
|
|
2
2
|
export var isSelectionEntirelyInsideCodeBlock = function isSelectionEntirelyInsideCodeBlock(state) {
|
|
3
3
|
return state.selection.$from.sameParent(state.selection.$to) && state.selection.$from.parent.type === state.schema.nodes.codeBlock;
|
|
4
4
|
};
|
|
@@ -2,7 +2,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
4
|
import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
import { getCursor } from '
|
|
5
|
+
import { getCursor } from '../utils';
|
|
6
6
|
import { filterCommand as filter } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { isCursorBeforeClosingCharacter, isClosingCharacter } from '../ide-ux/paired-character-handling';
|
|
8
8
|
import { getAutoClosingBracketInfo, shouldAutoCloseBracket } from '../ide-ux/bracket-handling';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
2
2
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
-
import { getCursor
|
|
4
|
+
import { getCursor } from '../utils';
|
|
5
|
+
import { isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
5
6
|
var deleteCurrentItem = function deleteCurrentItem($from) {
|
|
6
7
|
return function (tr) {
|
|
7
8
|
return tr.delete($from.before($from.depth), $from.after($from.depth));
|
|
@@ -40,7 +41,9 @@ export function keymapPlugin(schema) {
|
|
|
40
41
|
if ($cursor.node && isEmptyNode(schema)($cursor.node()) && (hasParentNodeOfType(layoutColumn)(state.selection) || hasParentNodeOfType(table)(state.selection))) {
|
|
41
42
|
var tr = state.tr;
|
|
42
43
|
var insertPos = $cursor.pos;
|
|
43
|
-
|
|
44
|
+
deleteCurrentItem($cursor)(tr);
|
|
45
|
+
setTextSelection(insertPos)(tr);
|
|
46
|
+
dispatch(tr.scrollIntoView());
|
|
44
47
|
return true;
|
|
45
48
|
}
|
|
46
49
|
|
|
@@ -3,8 +3,7 @@ import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
|
3
3
|
import CopyIcon from '@atlaskit/icon/glyph/copy';
|
|
4
4
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { removeCodeBlock, changeLanguage, copyContentToClipboard, resetCopiedState } from './actions';
|
|
6
|
-
import commonMessages from '
|
|
7
|
-
import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
6
|
+
import commonMessages, { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
8
7
|
import { provideVisualFeedbackForCopyButton, removeVisualFeedbackForCopyButton } from './pm-plugins/codeBlockCopySelectionPlugin';
|
|
9
8
|
import { pluginKey } from './plugin-key';
|
|
10
9
|
import { createLanguageList, getLanguageIdentifier, DEFAULT_LANGUAGES } from './language-list';
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export { findCodeBlock, transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark } from '@atlaskit/editor-common/transforms';
|
|
1
|
+
export { findCodeBlock, transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark } from '@atlaskit/editor-common/transforms';
|
|
2
|
+
export function getCursor(selection) {
|
|
3
|
+
return selection.$cursor || undefined;
|
|
4
|
+
}
|
|
@@ -7,7 +7,7 @@ import { IconExpand } from '@atlaskit/editor-common/quick-insert';
|
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { getToolbarConfig } from './toolbar';
|
|
9
9
|
import { createExpandNode, insertExpand } from './commands';
|
|
10
|
-
import { messages } from '
|
|
10
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
12
12
|
var expandPlugin = function expandPlugin(_ref) {
|
|
13
13
|
var _api$featureFlags, _api$analytics;
|
|
@@ -9,7 +9,7 @@ import { IconFeedback } from '@atlaskit/editor-common/quick-insert';
|
|
|
9
9
|
import { version as coreVersion } from '../../version-wrapper';
|
|
10
10
|
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
import loadJiraCollectorDialogScript from './loadJiraCollectorDialogScript';
|
|
12
|
-
import { messages } from '
|
|
12
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
13
13
|
var showJiraCollectorDialog;
|
|
14
14
|
var feedbackInfoHash;
|
|
15
15
|
var defaultFeedbackInfo;
|
|
@@ -11,7 +11,7 @@ import React, { PureComponent } from 'react';
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import DecisionIcon from '@atlaskit/icon/glyph/editor/decision';
|
|
13
13
|
import ToolbarButton, { TOOLBAR_BUTTON } from '../../../../ui/ToolbarButton';
|
|
14
|
-
import { messages } from '
|
|
14
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
15
15
|
import { insertTaskDecisionCommand } from '../../commands';
|
|
16
16
|
export var ToolbarDecision = /*#__PURE__*/function (_PureComponent) {
|
|
17
17
|
_inherits(ToolbarDecision, _PureComponent);
|
|
@@ -11,7 +11,7 @@ import React, { PureComponent } from 'react';
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import TaskIcon from '@atlaskit/icon/glyph/editor/task';
|
|
13
13
|
import ToolbarButton, { TOOLBAR_BUTTON } from '../../../../ui/ToolbarButton';
|
|
14
|
-
import { messages } from '
|
|
14
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
15
15
|
import { insertTaskDecisionCommand } from '../../commands';
|
|
16
16
|
export var ToolbarTask = /*#__PURE__*/function (_PureComponent) {
|
|
17
17
|
_inherits(ToolbarTask, _PureComponent);
|
|
@@ -3,11 +3,10 @@ var _templateObject, _templateObject2;
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { R75 } from '@atlaskit/theme/colors';
|
|
5
5
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorDeleteIconColor, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import {
|
|
7
|
-
import { codeBlockSharedStyles } from '@atlaskit/editor-common/styles';
|
|
6
|
+
import { codeBlockSharedStyles, CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
8
7
|
var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
9
8
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &::after {\n height: 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, none)");
|
|
10
9
|
};
|
|
11
10
|
export var codeBlockStyles = function codeBlockStyles(props) {
|
|
12
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), codeBlockSharedStyles(props), blockNodesVerticalMargin, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"),
|
|
11
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), codeBlockSharedStyles(props), blockNodesVerticalMargin, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, ".concat(R75, ")"), "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackground, ")"), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(akEditorDeleteIconColor, ")"), GutterDangerOverlay(), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))");
|
|
13
12
|
};
|
|
@@ -10,7 +10,7 @@ import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
|
10
10
|
import { tableStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
11
11
|
import { blocktypeStyles } from '@atlaskit/editor-plugin-block-type/styles';
|
|
12
12
|
import { textHighlightStyle } from '@atlaskit/editor-plugin-paste-options-toolbar/styles';
|
|
13
|
-
import { codeBlockStyles } from '
|
|
13
|
+
import { codeBlockStyles } from './code-block';
|
|
14
14
|
import { mediaStyles } from './media';
|
|
15
15
|
import { layoutStyles } from './layout';
|
|
16
16
|
import { panelStyles } from './panel';
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2
2
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3
3
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
4
|
-
import { nextMajorVersion } from '../version-wrapper';
|
|
5
4
|
var deprecationWarnings = function deprecationWarnings(className, props, deprecations) {
|
|
6
5
|
if (process.env.NODE_ENV === 'production') {
|
|
7
6
|
return;
|
|
8
7
|
}
|
|
9
|
-
var nextVersion = nextMajorVersion();
|
|
10
8
|
var _iterator = _createForOfIteratorHelper(deprecations),
|
|
11
9
|
_step;
|
|
12
10
|
try {
|
|
@@ -24,7 +22,7 @@ var deprecationWarnings = function deprecationWarnings(className, props, depreca
|
|
|
24
22
|
if (props.hasOwnProperty(property)) {
|
|
25
23
|
if (condition(props)) {
|
|
26
24
|
// eslint-disable-next-line no-console
|
|
27
|
-
console.warn("".concat(property, " property for ").concat(className, " is deprecated. ").concat(description, " [Will be ").concat(type, " in editor-core
|
|
25
|
+
console.warn("".concat(property, " property for ").concat(className, " is deprecated. ").concat(description, " [Will be ").concat(type, " in the next major editor-core version]"));
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { nextMajorVersion } from '../version-wrapper';
|
|
2
1
|
export default function editorDeprecationWarnings(props) {
|
|
3
2
|
if (process.env.NODE_ENV === 'production') {
|
|
4
3
|
return;
|
|
5
4
|
}
|
|
6
|
-
var nextVersion = nextMajorVersion();
|
|
7
5
|
var deprecatedProperties = {
|
|
8
6
|
allowTasksAndDecisions: {
|
|
9
7
|
message: 'To allow tasks and decisions use taskDecisionProvider – <Editor taskDecisionProvider={{ provider }} />',
|
|
@@ -24,11 +22,11 @@ export default function editorDeprecationWarnings(props) {
|
|
|
24
22
|
var type = meta.type || 'enabled by default';
|
|
25
23
|
|
|
26
24
|
// eslint-disable-next-line no-console
|
|
27
|
-
console.warn("".concat(property, " property is deprecated. ").concat(meta.message || '', " [Will be ").concat(type, " in editor-core
|
|
25
|
+
console.warn("".concat(property, " property is deprecated. ").concat(meta.message || '', " [Will be ").concat(type, " in the next major editor-core version]"));
|
|
28
26
|
}
|
|
29
27
|
});
|
|
30
28
|
if (props.hasOwnProperty('allowTables') && typeof props.allowTables !== 'boolean' && (!props.allowTables || !props.allowTables.advanced)) {
|
|
31
29
|
// eslint-disable-next-line no-console
|
|
32
|
-
console.warn("Advanced table options are deprecated (except isHeaderRowRequired) to continue using advanced table features use - <Editor allowTables={{ advanced: true }} /> [Will be changed in editor-core
|
|
30
|
+
console.warn("Advanced table options are deprecated (except isHeaderRowRequired) to continue using advanced table features use - <Editor allowTables={{ advanced: true }} /> [Will be changed in the next major editor-core version]");
|
|
33
31
|
}
|
|
34
32
|
}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -12,9 +12,6 @@ function isMarkTypeCompatibleWithMark(markType, mark) {
|
|
|
12
12
|
function isMarkTypeAllowedInNode(markType, state) {
|
|
13
13
|
return toggleMark(markType)(state);
|
|
14
14
|
}
|
|
15
|
-
export function getCursor(selection) {
|
|
16
|
-
return selection.$cursor || undefined;
|
|
17
|
-
}
|
|
18
15
|
|
|
19
16
|
/**
|
|
20
17
|
* Check if a mark is allowed at the current selection / cursor based on a given state.
|
|
@@ -102,53 +99,6 @@ export var isInsideBlockQuote = function isInsideBlockQuote(state) {
|
|
|
102
99
|
return hasParentNodeOfType(blockquote)(state.selection);
|
|
103
100
|
};
|
|
104
101
|
export { isTextSelection, isElementInTableCell, isLastItemMediaGroup, nonNullable } from '@atlaskit/editor-common/utils';
|
|
105
|
-
|
|
106
|
-
/** Helper type for single arg function */
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Compose 1 to n functions.
|
|
110
|
-
* @param func first function
|
|
111
|
-
* @param funcs additional functions
|
|
112
|
-
*/
|
|
113
|
-
export function compose(func) {
|
|
114
|
-
for (var _len = arguments.length, funcs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
115
|
-
funcs[_key - 1] = arguments[_key];
|
|
116
|
-
}
|
|
117
|
-
var allFuncs = [func].concat(funcs);
|
|
118
|
-
return function composed(raw) {
|
|
119
|
-
return allFuncs.reduceRight(function (memo, func) {
|
|
120
|
-
return func(memo);
|
|
121
|
-
}, raw);
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// one function
|
|
126
|
-
|
|
127
|
-
// two function
|
|
128
|
-
|
|
129
|
-
// three function
|
|
130
|
-
|
|
131
|
-
// If needed add more than 3 function
|
|
132
|
-
// Generic
|
|
133
|
-
// rest
|
|
134
|
-
export function pipe() {
|
|
135
|
-
for (var _len2 = arguments.length, fns = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
136
|
-
fns[_key2] = arguments[_key2];
|
|
137
|
-
}
|
|
138
|
-
if (fns.length === 0) {
|
|
139
|
-
return function (a) {
|
|
140
|
-
return a;
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
if (fns.length === 1) {
|
|
144
|
-
return fns[0];
|
|
145
|
-
}
|
|
146
|
-
return fns.reduce(function (prevFn, nextFn) {
|
|
147
|
-
return function () {
|
|
148
|
-
return nextFn(prevFn.apply(void 0, arguments));
|
|
149
|
-
};
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
102
|
export function sum(arr, f) {
|
|
153
103
|
return arr.reduce(function (val, x) {
|
|
154
104
|
return val + f(x);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { Command } from '
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
export declare const removeCodeBlock: Command;
|
|
5
5
|
export declare const changeLanguage: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (language: string) => Command;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { getPosHandlerNode, getPosHandler } from '
|
|
3
|
+
import type { getPosHandlerNode, getPosHandler } from '@atlaskit/editor-common/types';
|
|
4
4
|
export declare class CodeBlockView {
|
|
5
5
|
node: Node;
|
|
6
6
|
dom: HTMLElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type codeBlockPlugin from '../';
|
|
3
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type codeBlockPlugin from '../';
|
|
4
4
|
declare const ideUX: (pluginInjectionApi: ExtractInjectionAPI<typeof codeBlockPlugin> | undefined) => SafePlugin<any>;
|
|
5
5
|
export default ideUX;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
|
-
import type {
|
|
3
|
+
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { CodeBlockState } from './main-state';
|
|
5
5
|
export declare const createPlugin: ({ useLongPressSelection, getIntl, appearance, allowCompositionInputOverride, }: {
|
|
6
6
|
useLongPressSelection?: boolean | undefined;
|
|
7
7
|
getIntl: () => IntlShape;
|
|
8
|
-
appearance:
|
|
8
|
+
appearance: EditorAppearance;
|
|
9
9
|
allowCompositionInputOverride?: boolean | undefined;
|
|
10
10
|
}) => SafePlugin<CodeBlockState>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { EditorAppearance } from '
|
|
2
|
-
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { LongPressSelectionPluginOptions, EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
2
|
export interface CodeBlockOptions extends LongPressSelectionPluginOptions {
|
|
4
3
|
allowCopyToClipboard?: boolean;
|
|
5
4
|
allowCompositionInputOverride?: boolean;
|
|
@@ -1 +1,4 @@
|
|
|
1
1
|
export { findCodeBlock, transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, } from '@atlaskit/editor-common/transforms';
|
|
2
|
+
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
export declare function getCursor(selection: Selection): ResolvedPos | undefined;
|
package/dist/{types-ts4.5/plugins/code-block/styles.d.ts → types/ui/ContentStyles/code-block.d.ts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
|
+
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
2
|
export declare const codeBlockStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MarkType,
|
|
2
|
-
import type { EditorState
|
|
1
|
+
import type { MarkType, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
4
|
export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON, } from '@atlaskit/editor-common/utils';
|
|
5
5
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
@@ -8,7 +8,6 @@ export { isParagraph, isText, isLinkMark } from './nodes';
|
|
|
8
8
|
export { setNodeSelection, setTextSelection } from './selection';
|
|
9
9
|
export type { JSONDocNode };
|
|
10
10
|
export { default as measurements } from './performance/measure-enum';
|
|
11
|
-
export declare function getCursor(selection: Selection): ResolvedPos | undefined;
|
|
12
11
|
/**
|
|
13
12
|
* Check if a mark is allowed at the current selection / cursor based on a given state.
|
|
14
13
|
* This method looks at both the currently active marks on the transaction, as well as
|
|
@@ -25,20 +24,5 @@ export declare const isTemporary: (id: string) => boolean;
|
|
|
25
24
|
export declare const hasOpenEnd: (slice: Slice) => boolean;
|
|
26
25
|
export declare const isInsideBlockQuote: (state: EditorState) => boolean;
|
|
27
26
|
export { isTextSelection, isElementInTableCell, isLastItemMediaGroup, nonNullable, } from '@atlaskit/editor-common/utils';
|
|
28
|
-
/** Helper type for single arg function */
|
|
29
|
-
type Func<A, B> = (a: A) => B;
|
|
30
|
-
type FuncN<A extends any[], B> = (...args: A) => B;
|
|
31
|
-
/**
|
|
32
|
-
* Compose 1 to n functions.
|
|
33
|
-
* @param func first function
|
|
34
|
-
* @param funcs additional functions
|
|
35
|
-
*/
|
|
36
|
-
export declare function compose<F1 extends Func<any, any>, FN extends Array<Func<any, any>>, R extends FN extends [] ? F1 : FN extends [Func<infer A, any>] ? (a: A) => ReturnType<F1> : FN extends [any, Func<infer A, any>] ? (a: A) => ReturnType<F1> : FN extends [any, any, Func<infer A, any>] ? (a: A) => ReturnType<F1> : FN extends [any, any, any, Func<infer A, any>] ? (a: A) => ReturnType<F1> : FN extends [any, any, any, any, Func<infer A, any>] ? (a: A) => ReturnType<F1> : Func<any, ReturnType<F1>>>(func: F1, ...funcs: FN): R;
|
|
37
|
-
export declare function pipe(): <R>(a: R) => R;
|
|
38
|
-
export declare function pipe<F extends Function>(f: F): F;
|
|
39
|
-
export declare function pipe<F1 extends FuncN<any, any>>(f1: F1): (...args: Parameters<F1>) => ReturnType<F1>;
|
|
40
|
-
export declare function pipe<F1 extends FuncN<any, any>, F2 extends Func<ReturnType<F1>, any>>(f1: F1, f2: F2): (...args: Parameters<F1>) => ReturnType<F2>;
|
|
41
|
-
export declare function pipe<F1 extends FuncN<any, any>, F2 extends Func<ReturnType<F1>, any>, F3 extends Func<ReturnType<F2>, any>>(f1: F1, f2: F2, f3: F3): (...args: Parameters<F1>) => ReturnType<F3>;
|
|
42
|
-
export declare function pipe<F1 extends FuncN<any, any>, F2 extends Func<ReturnType<F1>, any>, F3 extends Func<ReturnType<F2>, any>, FN extends Array<Func<any, any>>>(f1: F1, f2: F2, f3: F3, ...fn: FN): (...args: Parameters<F1>) => any;
|
|
43
27
|
export declare function sum<T>(arr: Array<T>, f: (val: T) => number): number;
|
|
44
28
|
export { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { Command } from '
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
export declare const removeCodeBlock: Command;
|
|
5
5
|
export declare const changeLanguage: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (language: string) => Command;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { getPosHandlerNode, getPosHandler } from '
|
|
3
|
+
import type { getPosHandlerNode, getPosHandler } from '@atlaskit/editor-common/types';
|
|
4
4
|
export declare class CodeBlockView {
|
|
5
5
|
node: Node;
|
|
6
6
|
dom: HTMLElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type codeBlockPlugin from '../';
|
|
3
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type codeBlockPlugin from '../';
|
|
4
4
|
declare const ideUX: (pluginInjectionApi: ExtractInjectionAPI<typeof codeBlockPlugin> | undefined) => SafePlugin<any>;
|
|
5
5
|
export default ideUX;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
|
-
import type {
|
|
3
|
+
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { CodeBlockState } from './main-state';
|
|
5
5
|
export declare const createPlugin: ({ useLongPressSelection, getIntl, appearance, allowCompositionInputOverride, }: {
|
|
6
6
|
useLongPressSelection?: boolean | undefined;
|
|
7
7
|
getIntl: () => IntlShape;
|
|
8
|
-
appearance:
|
|
8
|
+
appearance: EditorAppearance;
|
|
9
9
|
allowCompositionInputOverride?: boolean | undefined;
|
|
10
10
|
}) => SafePlugin<CodeBlockState>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { EditorAppearance } from '
|
|
2
|
-
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { LongPressSelectionPluginOptions, EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
2
|
export interface CodeBlockOptions extends LongPressSelectionPluginOptions {
|
|
4
3
|
allowCopyToClipboard?: boolean;
|
|
5
4
|
allowCompositionInputOverride?: boolean;
|
|
@@ -1 +1,4 @@
|
|
|
1
1
|
export { findCodeBlock, transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, } from '@atlaskit/editor-common/transforms';
|
|
2
|
+
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
export declare function getCursor(selection: Selection): ResolvedPos | undefined;
|
package/dist/{types/plugins/code-block/styles.d.ts → types-ts4.5/ui/ContentStyles/code-block.d.ts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
|
+
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
2
2
|
export declare const codeBlockStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MarkType,
|
|
2
|
-
import type { EditorState
|
|
1
|
+
import type { MarkType, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
4
|
export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON, } from '@atlaskit/editor-common/utils';
|
|
5
5
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
@@ -8,7 +8,6 @@ export { isParagraph, isText, isLinkMark } from './nodes';
|
|
|
8
8
|
export { setNodeSelection, setTextSelection } from './selection';
|
|
9
9
|
export type { JSONDocNode };
|
|
10
10
|
export { default as measurements } from './performance/measure-enum';
|
|
11
|
-
export declare function getCursor(selection: Selection): ResolvedPos | undefined;
|
|
12
11
|
/**
|
|
13
12
|
* Check if a mark is allowed at the current selection / cursor based on a given state.
|
|
14
13
|
* This method looks at both the currently active marks on the transaction, as well as
|
|
@@ -25,41 +24,5 @@ export declare const isTemporary: (id: string) => boolean;
|
|
|
25
24
|
export declare const hasOpenEnd: (slice: Slice) => boolean;
|
|
26
25
|
export declare const isInsideBlockQuote: (state: EditorState) => boolean;
|
|
27
26
|
export { isTextSelection, isElementInTableCell, isLastItemMediaGroup, nonNullable, } from '@atlaskit/editor-common/utils';
|
|
28
|
-
/** Helper type for single arg function */
|
|
29
|
-
type Func<A, B> = (a: A) => B;
|
|
30
|
-
type FuncN<A extends any[], B> = (...args: A) => B;
|
|
31
|
-
/**
|
|
32
|
-
* Compose 1 to n functions.
|
|
33
|
-
* @param func first function
|
|
34
|
-
* @param funcs additional functions
|
|
35
|
-
*/
|
|
36
|
-
export declare function compose<F1 extends Func<any, any>, FN extends Array<Func<any, any>>, R extends FN extends [
|
|
37
|
-
] ? F1 : FN extends [
|
|
38
|
-
Func<infer A, any>
|
|
39
|
-
] ? (a: A) => ReturnType<F1> : FN extends [
|
|
40
|
-
any,
|
|
41
|
-
Func<infer A, any>
|
|
42
|
-
] ? (a: A) => ReturnType<F1> : FN extends [
|
|
43
|
-
any,
|
|
44
|
-
any,
|
|
45
|
-
Func<infer A, any>
|
|
46
|
-
] ? (a: A) => ReturnType<F1> : FN extends [
|
|
47
|
-
any,
|
|
48
|
-
any,
|
|
49
|
-
any,
|
|
50
|
-
Func<infer A, any>
|
|
51
|
-
] ? (a: A) => ReturnType<F1> : FN extends [
|
|
52
|
-
any,
|
|
53
|
-
any,
|
|
54
|
-
any,
|
|
55
|
-
any,
|
|
56
|
-
Func<infer A, any>
|
|
57
|
-
] ? (a: A) => ReturnType<F1> : Func<any, ReturnType<F1>>>(func: F1, ...funcs: FN): R;
|
|
58
|
-
export declare function pipe(): <R>(a: R) => R;
|
|
59
|
-
export declare function pipe<F extends Function>(f: F): F;
|
|
60
|
-
export declare function pipe<F1 extends FuncN<any, any>>(f1: F1): (...args: Parameters<F1>) => ReturnType<F1>;
|
|
61
|
-
export declare function pipe<F1 extends FuncN<any, any>, F2 extends Func<ReturnType<F1>, any>>(f1: F1, f2: F2): (...args: Parameters<F1>) => ReturnType<F2>;
|
|
62
|
-
export declare function pipe<F1 extends FuncN<any, any>, F2 extends Func<ReturnType<F1>, any>, F3 extends Func<ReturnType<F2>, any>>(f1: F1, f2: F2, f3: F3): (...args: Parameters<F1>) => ReturnType<F3>;
|
|
63
|
-
export declare function pipe<F1 extends FuncN<any, any>, F2 extends Func<ReturnType<F1>, any>, F3 extends Func<ReturnType<F2>, any>, FN extends Array<Func<any, any>>>(f1: F1, f2: F2, f3: F3, ...fn: FN): (...args: Parameters<F1>) => any;
|
|
64
27
|
export declare function sum<T>(arr: Array<T>, f: (val: T) => number): number;
|
|
65
28
|
export { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|