@atlaskit/editor-core 191.6.0 → 191.7.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 +21 -0
- package/afm-cc/tsconfig.json +1 -211
- package/dist/cjs/composable-editor/editor-internal.js +4 -0
- package/dist/cjs/composable-editor/editor.js +2 -2
- package/dist/cjs/composable-editor/hooks/useProviders.js +57 -0
- package/dist/cjs/labs-next.js +1 -1
- package/dist/cjs/presets/default.js +35 -32
- package/dist/cjs/presets/universal.js +70 -70
- package/dist/cjs/test-utils.js +2 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/ContentStyles/expand.js +1 -1
- package/dist/cjs/ui/ContentStyles/index.js +5 -5
- package/dist/cjs/ui/ContentStyles/layout.js +2 -2
- package/dist/cjs/ui/ToolbarFeedback/index.js +6 -7
- package/dist/cjs/ui/WithHelpTrigger/index.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +4 -0
- package/dist/es2019/composable-editor/editor.js +1 -1
- package/dist/es2019/composable-editor/hooks/useProviders.js +28 -0
- package/dist/es2019/index.js +2 -2
- package/dist/es2019/labs-next.js +1 -1
- package/dist/es2019/presets/default.js +32 -29
- package/dist/es2019/presets/universal.js +45 -45
- package/dist/es2019/test-utils.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/es2019/ui/ContentStyles/expand.js +2 -2
- package/dist/es2019/ui/ContentStyles/index.js +5 -5
- package/dist/es2019/ui/ContentStyles/layout.js +2 -2
- package/dist/es2019/ui/ToolbarFeedback/index.js +2 -3
- package/dist/es2019/ui/WithHelpTrigger/index.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +4 -0
- package/dist/esm/composable-editor/editor.js +1 -1
- package/dist/esm/composable-editor/hooks/useProviders.js +50 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/labs-next.js +1 -1
- package/dist/esm/presets/default.js +32 -29
- package/dist/esm/presets/universal.js +45 -45
- package/dist/esm/test-utils.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/esm/ui/ContentStyles/expand.js +2 -2
- package/dist/esm/ui/ContentStyles/index.js +5 -5
- package/dist/esm/ui/ContentStyles/layout.js +2 -2
- package/dist/esm/ui/ToolbarFeedback/index.js +6 -7
- package/dist/esm/ui/WithHelpTrigger/index.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/hooks/useProviders.d.ts +14 -0
- package/dist/types/create-editor/create-plugins-list.d.ts +3 -4
- package/dist/types/create-editor/create-preset.d.ts +235 -63
- package/dist/types/index.d.ts +4 -4
- package/dist/types/labs-next.d.ts +1 -1
- package/dist/types/presets/default.d.ts +908 -758
- package/dist/types/presets/universal.d.ts +433 -262
- package/dist/types/presets/useUniversalPreset.d.ts +235 -63
- package/dist/types/types/editor-props.d.ts +12 -12
- package/dist/types/ui/ContextPanel/index.d.ts +1 -1
- package/dist/types/utils/action.d.ts +2 -2
- package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +14 -0
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +3 -4
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +255 -56
- package/dist/types-ts4.5/index.d.ts +4 -4
- package/dist/types-ts4.5/labs-next.d.ts +1 -1
- package/dist/types-ts4.5/presets/default.d.ts +930 -756
- package/dist/types-ts4.5/presets/universal.d.ts +453 -255
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +255 -56
- package/dist/types-ts4.5/types/editor-props.d.ts +12 -12
- package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/action.d.ts +2 -2
- package/docs/0-intro.tsx +5 -5
- package/package.json +17 -150
- package/tsconfig.json +196 -166
- package/dist/cjs/presets/types.js +0 -5
- package/dist/es2019/presets/types.js +0 -1
- package/dist/esm/presets/types.js +0 -1
- package/dist/types/presets/types.d.ts +0 -6
- package/dist/types-ts4.5/presets/types.d.ts +0 -6
|
@@ -2,8 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { columnLayoutSharedStyle, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '@atlaskit/editor-common/styles';
|
|
5
|
-
import { TableCssClassName } from '@atlaskit/editor-
|
|
6
|
-
import { tableMarginFullWidthMode } from '@atlaskit/editor-
|
|
5
|
+
import { TableCssClassName } from '@atlaskit/editor-plugins/table/types';
|
|
6
|
+
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
|
|
7
7
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { N40A, N50A } from '@atlaskit/theme/colors';
|
|
9
9
|
export { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN };
|
|
@@ -96,8 +96,8 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
98
|
_defineProperty(_assertThisInitialized(_this), "openJiraIssueCollector", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
99
|
-
var _this$props$api, _window$localStorage$,
|
|
100
|
-
var
|
|
99
|
+
var _this$props$api, _window$localStorage$, _this$props$api2;
|
|
100
|
+
var contentId, sessionId, tabId;
|
|
101
101
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
102
102
|
while (1) switch (_context.prev = _context.next) {
|
|
103
103
|
case 0:
|
|
@@ -105,21 +105,20 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
|
105
105
|
jiraIssueCollectorScriptLoading: true,
|
|
106
106
|
showOptOutOption: false
|
|
107
107
|
});
|
|
108
|
-
|
|
108
|
+
contentId = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.contextIdentifier) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.sharedState.currentState()) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.contextIdentifierProvider) === null || _this$props$api === void 0 ? void 0 : _this$props$api.objectId;
|
|
109
109
|
sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
|
|
110
|
-
contentId = basePluginState === null || basePluginState === void 0 || (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
|
|
111
110
|
tabId = window.sessionStorage['awc.tab.id'];
|
|
112
|
-
_context.next =
|
|
111
|
+
_context.next = 6;
|
|
113
112
|
return (_this$props$api2 = _this.props.api) === null || _this$props$api2 === void 0 || (_this$props$api2 = _this$props$api2.feedbackDialog) === null || _this$props$api2 === void 0 ? void 0 : _this$props$api2.actions.openFeedbackDialog(_objectSpread(_objectSpread({}, _this.getFeedbackInfo()), {}, {
|
|
114
113
|
sessionId: sessionId,
|
|
115
114
|
contentId: contentId,
|
|
116
115
|
tabId: tabId
|
|
117
116
|
}));
|
|
118
|
-
case
|
|
117
|
+
case 6:
|
|
119
118
|
_this.setState({
|
|
120
119
|
jiraIssueCollectorScriptLoading: false
|
|
121
120
|
});
|
|
122
|
-
case
|
|
121
|
+
case 7:
|
|
123
122
|
case "end":
|
|
124
123
|
return _context.stop();
|
|
125
124
|
}
|
|
@@ -11,7 +11,7 @@ import React from 'react';
|
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
13
13
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
14
|
-
import { deprecatedOpenHelpCommand } from '@atlaskit/editor-
|
|
14
|
+
import { deprecatedOpenHelpCommand } from '@atlaskit/editor-plugins/help-dialog';
|
|
15
15
|
import { createDispatch } from '../../event-dispatcher';
|
|
16
16
|
var WithHelpTrigger = /*#__PURE__*/function (_React$Component) {
|
|
17
17
|
_inherits(WithHelpTrigger, _React$Component);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "191.
|
|
2
|
+
export var version = "191.7.0";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
+
interface UseProvidersProps {
|
|
3
|
+
contextIdentifierProvider: Promise<ContextIdentifierProvider> | undefined;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This hook is used to replace the old approach of using the `providerFactory`.
|
|
7
|
+
*
|
|
8
|
+
* Because plugins can't update their initial configuration, this hook listens to changes
|
|
9
|
+
* and calls a command to push the update to the plugins shared state.
|
|
10
|
+
*
|
|
11
|
+
* In the future ideally consumers implement this behaviour themselves.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useProviders: ({ contextIdentifierProvider, }: UseProvidersProps) => void;
|
|
14
|
+
export {};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { EditorPluginInjectionAPI, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
3
|
-
import type { ScrollGutterPluginOptions } from '@atlaskit/editor-
|
|
4
|
-
import type { DefaultPresetPluginOptions } from '
|
|
5
|
-
import type { EditorPresetProps } from '../presets/types';
|
|
3
|
+
import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugins/base';
|
|
4
|
+
import type { DefaultPresetPluginOptions } from '../../src/presets/default';
|
|
6
5
|
import type { EditorPlugin, EditorProps } from '../types';
|
|
7
6
|
import type { EditorPluginFeatureProps } from '../types/editor-props';
|
|
8
7
|
export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
|
|
9
|
-
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent):
|
|
8
|
+
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
10
9
|
/**
|
|
11
10
|
* Maps EditorProps to EditorPlugins
|
|
12
11
|
*
|