@atlaskit/editor-core 198.3.2 → 198.4.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/composable-editor/editor-internal.js +2 -1
  3. package/dist/cjs/composable-editor/hooks/useProviders.js +10 -1
  4. package/dist/cjs/composable-editor/utils/handleProviders.js +3 -1
  5. package/dist/cjs/create-editor/ReactEditorView.js +0 -4
  6. package/dist/cjs/create-editor/create-schema.js +51 -1
  7. package/dist/cjs/presets/universal.js +2 -1
  8. package/dist/cjs/ui/ContentStyles/index.js +1 -1
  9. package/dist/cjs/version-wrapper.js +1 -1
  10. package/dist/es2019/composable-editor/editor-internal.js +2 -1
  11. package/dist/es2019/composable-editor/hooks/useProviders.js +10 -1
  12. package/dist/es2019/composable-editor/utils/handleProviders.js +3 -1
  13. package/dist/es2019/create-editor/ReactEditorView.js +0 -4
  14. package/dist/es2019/create-editor/create-schema.js +49 -1
  15. package/dist/es2019/presets/universal.js +1 -0
  16. package/dist/es2019/ui/ContentStyles/index.js +10 -1
  17. package/dist/es2019/version-wrapper.js +1 -1
  18. package/dist/esm/composable-editor/editor-internal.js +2 -1
  19. package/dist/esm/composable-editor/hooks/useProviders.js +10 -1
  20. package/dist/esm/composable-editor/utils/handleProviders.js +3 -1
  21. package/dist/esm/create-editor/ReactEditorView.js +0 -4
  22. package/dist/esm/create-editor/create-schema.js +48 -1
  23. package/dist/esm/presets/universal.js +2 -1
  24. package/dist/esm/ui/ContentStyles/index.js +1 -1
  25. package/dist/esm/version-wrapper.js +1 -1
  26. package/dist/types/composable-editor/hooks/useProviders.d.ts +6 -2
  27. package/dist/types/create-editor/ReactEditorView.d.ts +0 -4
  28. package/dist/types/create-editor/create-schema.d.ts +11 -0
  29. package/dist/types/create-editor/create-universal-preset.d.ts +4 -0
  30. package/dist/types/presets/universal.d.ts +4 -0
  31. package/dist/types/presets/useUniversalPreset.d.ts +4 -0
  32. package/dist/types/types/editor-props.d.ts +3 -0
  33. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  34. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  35. package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +6 -2
  36. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +0 -4
  37. package/dist/types-ts4.5/create-editor/create-schema.d.ts +11 -0
  38. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +4 -0
  39. package/dist/types-ts4.5/presets/universal.d.ts +4 -0
  40. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +4 -0
  41. package/dist/types-ts4.5/types/editor-props.d.ts +3 -0
  42. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
  43. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  44. package/package.json +5 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 198.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#149178](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149178)
8
+ [`f3c027c1f8373`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f3c027c1f8373) -
9
+ [ED-24859] Improve LazyNodeView toDOM implementation to avoid LayoutShifts
10
+
11
+ ## 198.4.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#137506](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137506)
16
+ [`75c4ebf9d7515`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/75c4ebf9d7515) -
17
+ Pass TaskDecisionProvider via preset
18
+
19
+ ### Patch Changes
20
+
21
+ - [#148229](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/148229)
22
+ [`c93af357bcf75`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c93af357bcf75) -
23
+ ED-24121: Removes legacy context type from reacteditorview
24
+ - Updated dependencies
25
+
3
26
  ## 198.3.2
4
27
 
5
28
  ### Patch Changes
@@ -180,7 +180,8 @@ function ReactEditorViewContextWrapper(props) {
180
180
  mediaProvider: (_media = props.editorProps.media) === null || _media === void 0 ? void 0 : _media.provider,
181
181
  cardProvider: ((_linking = props.editorProps.linking) === null || _linking === void 0 || (_linking = _linking.smartLinks) === null || _linking === void 0 ? void 0 : _linking.provider) || smartLinks && smartLinks.provider || UNSAFE_cards && UNSAFE_cards.provider,
182
182
  emojiProvider: props.editorProps.emojiProvider,
183
- autoformattingProvider: props.editorProps.autoformattingProvider
183
+ autoformattingProvider: props.editorProps.autoformattingProvider,
184
+ taskDecisionProvider: props.editorProps.taskDecisionProvider
184
185
  });
185
186
  return (0, _react2.jsx)(_ReactEditorView.default, (0, _extends2.default)({}, props, {
186
187
  editorAPI: editorAPI,
@@ -23,7 +23,8 @@ var useProviders = exports.useProviders = function useProviders(_ref) {
23
23
  mediaProvider = _ref.mediaProvider,
24
24
  cardProvider = _ref.cardProvider,
25
25
  emojiProvider = _ref.emojiProvider,
26
- autoformattingProvider = _ref.autoformattingProvider;
26
+ autoformattingProvider = _ref.autoformattingProvider,
27
+ taskDecisionProvider = _ref.taskDecisionProvider;
27
28
  (0, _react.useEffect)(function () {
28
29
  function setProvider() {
29
30
  return _setProvider.apply(this, arguments);
@@ -84,4 +85,12 @@ var useProviders = exports.useProviders = function useProviders(_ref) {
84
85
  }
85
86
  }
86
87
  }, [autoformattingProvider, editorApi]);
88
+ (0, _react.useEffect)(function () {
89
+ if ((0, _platformFeatureFlags.fg)('platform_editor_td_provider_from_plugin_config')) {
90
+ if (taskDecisionProvider) {
91
+ var _editorApi$taskDecisi;
92
+ editorApi === null || editorApi === void 0 || (_editorApi$taskDecisi = editorApi.taskDecision) === null || _editorApi$taskDecisi === void 0 || _editorApi$taskDecisi.actions.setProvider(taskDecisionProvider);
93
+ }
94
+ }
95
+ }, [taskDecisionProvider, editorApi]);
87
96
  };
@@ -28,7 +28,9 @@ function handleProviders(providerFactory, _ref, extensionProvider, quickInsertPr
28
28
  searchProvider = _ref.searchProvider;
29
29
  providerFactory.setProvider('emojiProvider', emojiProvider);
30
30
  providerFactory.setProvider('mentionProvider', mentionProvider);
31
- providerFactory.setProvider('taskDecisionProvider', taskDecisionProvider);
31
+ if (!(0, _platformFeatureFlags.fg)('platform_editor_td_provider_from_plugin_config')) {
32
+ providerFactory.setProvider('taskDecisionProvider', taskDecisionProvider);
33
+ }
32
34
  providerFactory.setProvider('contextIdentifierProvider', contextIdentifierProvider);
33
35
  providerFactory.setProvider('imageUploadProvider', imageUploadProvider);
34
36
  providerFactory.setProvider('collabEditProvider', collabEditProvider);
@@ -13,7 +13,6 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
13
13
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _react = _interopRequireDefault(require("react"));
16
- var _propTypes = _interopRequireDefault(require("prop-types"));
17
16
  var _reactIntlNext = require("react-intl-next");
18
17
  var _v = _interopRequireDefault(require("uuid/v4"));
19
18
  var _analytics = require("@atlaskit/editor-common/analytics");
@@ -827,9 +826,6 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
827
826
  }]);
828
827
  return ReactEditorView;
829
828
  }(_react.default.Component);
830
- (0, _defineProperty2.default)(ReactEditorView, "contextTypes", {
831
- getAtlaskitAnalyticsEventHandlers: _propTypes.default.func
832
- });
833
829
  function getUAPrefix() {
834
830
  if (_browser.browser.chrome) {
835
831
  return 'ua-chrome';
@@ -1,20 +1,70 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
7
+ exports.createGenericMetada = void 0;
6
8
  exports.createSchema = createSchema;
9
+ exports.wrapToDOMProxy = exports.wrapNodeSpecProxy = void 0;
10
+ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
11
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
7
12
  var _model = require("@atlaskit/editor-prosemirror/model");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
14
  var _sanitizeNodes = require("../utils/sanitizeNodes");
9
15
  var _createEditor = require("./create-editor");
10
16
  var _sortByOrder = require("./sort-by-order");
17
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19
+ var createGenericMetada = exports.createGenericMetada = function createGenericMetada(node) {
20
+ var commonAttributes = (0, _defineProperty2.default)({}, 'data-prosemirror-node-name', node.type.name);
21
+ if (!node.type.isBlock) {
22
+ return commonAttributes;
23
+ }
24
+ return _objectSpread(_objectSpread({}, commonAttributes), {}, (0, _defineProperty2.default)({}, 'data-prosemirror-node-block', true));
25
+ };
26
+ var wrapToDOMProxy = exports.wrapToDOMProxy = function wrapToDOMProxy(toDOM) {
27
+ var toDOMProxy = new Proxy(toDOM, {
28
+ apply: function apply(target, thisArg, argumentsList) {
29
+ var result = Reflect.apply(target, thisArg, argumentsList);
30
+ if (!Array.isArray(result)) {
31
+ return result;
32
+ }
33
+ var node = argumentsList[0];
34
+ var hasAttributes = (0, _typeof2.default)(result[1]) === 'object' && !Array.isArray(result[1]);
35
+ if (hasAttributes) {
36
+ result[1] = Object.assign(result[1], createGenericMetada(node));
37
+ } else {
38
+ result.splice(1, 0, createGenericMetada(node));
39
+ }
40
+ return result;
41
+ }
42
+ });
43
+ return toDOMProxy;
44
+ };
45
+ var wrapNodeSpecProxy = exports.wrapNodeSpecProxy = function wrapNodeSpecProxy(spec) {
46
+ var nodeSpecProxy = new Proxy(spec, {
47
+ get: function get(target, prop, receiver) {
48
+ var result = Reflect.get(target, prop, receiver);
49
+ if (prop !== 'toDOM' || !result) {
50
+ return result;
51
+ }
52
+ return wrapToDOMProxy(result);
53
+ }
54
+ });
55
+ return nodeSpecProxy;
56
+ };
11
57
  function createSchema(editorConfig) {
12
58
  var marks = (0, _createEditor.fixExcludes)(editorConfig.marks.sort((0, _sortByOrder.sortByOrder)('marks')).reduce(function (acc, mark) {
13
59
  acc[mark.name] = mark.mark;
14
60
  return acc;
15
61
  }, {}));
16
62
  var nodes = (0, _sanitizeNodes.sanitizeNodes)(editorConfig.nodes.sort((0, _sortByOrder.sortByOrder)('nodes')).reduce(function (acc, node) {
17
- acc[node.name] = node.node;
63
+ if ((0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css')) {
64
+ acc[node.name] = wrapNodeSpecProxy(node.node);
65
+ } else {
66
+ acc[node.name] = node.node;
67
+ }
18
68
  return acc;
19
69
  }, {}), marks);
20
70
  return new _model.Schema({
@@ -162,7 +162,8 @@ function createUniversalPresetInternal(_ref) {
162
162
  }, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.tablesPlugin)], Boolean(props.allowTables)).maybeAdd([_tasksAndDecisions.tasksAndDecisionsPlugin, _objectSpread({
163
163
  allowNestedTasks: props.allowNestedTasks,
164
164
  consumeTabs: isFullPage,
165
- useLongPressSelection: false
165
+ useLongPressSelection: false,
166
+ taskDecisionProvider: props.taskDecisionProvider
166
167
  }, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.tasksAndDecisionsPlugin)], Boolean(props.allowTasksAndDecisions || props.taskDecisionProvider)).maybeAdd([_feedbackDialog.feedbackDialogPlugin, _objectSpread({
167
168
  coreVersion: _versionWrapper.version
168
169
  }, props.feedbackInfo)], Boolean(props.feedbackInfo)).maybeAdd([_helpDialog.helpDialogPlugin, !!props.legacyImageUploadProvider], Boolean(props.allowHelpDialog)).maybeAdd([_saveOnEnter.saveOnEnterPlugin, props.onSave], Boolean(props.saveOnEnter && props.onSave)).maybeAdd(_imageUpload.imageUploadPlugin, Boolean(props.legacyImageUploadProvider)).maybeAdd(
@@ -86,7 +86,7 @@ var fixBlockControlStylesSSR = exports.fixBlockControlStylesSSR = function fixBl
86
86
  // The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
87
87
  var akEditorBreakpointForSmallDevice = "1266px";
88
88
  var contentStyles = function contentStyles(props) {
89
- return (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: 52px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (min-width: ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t", "\n\n\t", "\n\t", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Link icon in the Atlaskit package\n is bigger than the others\n */\n\t.hyperlink-open-link {\n\t\tsvg {\n\t\t\tmax-width: 18px;\n\t\t}\n\t\t&[href] {\n\t\t\tpadding: 0 4px;\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorGutterPadding, _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, (0, _editorSharedStyles.editorFontSize)({
89
+ return (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: 52px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t", "\n\n\t", "\n\t", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Link icon in the Atlaskit package\n is bigger than the others\n */\n\t.hyperlink-open-link {\n\t\tsvg {\n\t\t\tmax-width: 18px;\n\t\t}\n\t\t&[href] {\n\t\t\tpadding: 0 4px;\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorGutterPadding, _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, (0, _editorSharedStyles.editorFontSize)({
90
90
  theme: props.theme
91
91
  }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), "var(--ds-border-focused, #8cf)", (0, _platformFeatureFlags.fg)('platform_editor_mark_boundary_cursor') ? (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t"]))) : null, _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), _media.mediaStyles, (0, _layout.layoutStyles)(props.viewMode), _collab.telepointerStyle, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, (0, _aiPanels.aiPanelStyles)(props.colorMode), fixBlockControlStylesSSR(), _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
92
92
  };
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "198.3.2";
8
+ var version = exports.version = "198.4.1";
@@ -169,7 +169,8 @@ function ReactEditorViewContextWrapper(props) {
169
169
  mediaProvider: (_media = props.editorProps.media) === null || _media === void 0 ? void 0 : _media.provider,
170
170
  cardProvider: ((_linking = props.editorProps.linking) === null || _linking === void 0 ? void 0 : (_linking$smartLinks = _linking.smartLinks) === null || _linking$smartLinks === void 0 ? void 0 : _linking$smartLinks.provider) || smartLinks && smartLinks.provider || UNSAFE_cards && UNSAFE_cards.provider,
171
171
  emojiProvider: props.editorProps.emojiProvider,
172
- autoformattingProvider: props.editorProps.autoformattingProvider
172
+ autoformattingProvider: props.editorProps.autoformattingProvider,
173
+ taskDecisionProvider: props.editorProps.taskDecisionProvider
173
174
  });
174
175
  return jsx(ReactEditorView, _extends({}, props, {
175
176
  editorAPI: editorAPI,
@@ -14,7 +14,8 @@ export const useProviders = ({
14
14
  mediaProvider,
15
15
  cardProvider,
16
16
  emojiProvider,
17
- autoformattingProvider
17
+ autoformattingProvider,
18
+ taskDecisionProvider
18
19
  }) => {
19
20
  useEffect(() => {
20
21
  async function setProvider() {
@@ -55,4 +56,12 @@ export const useProviders = ({
55
56
  }
56
57
  }
57
58
  }, [autoformattingProvider, editorApi]);
59
+ useEffect(() => {
60
+ if (fg('platform_editor_td_provider_from_plugin_config')) {
61
+ if (taskDecisionProvider) {
62
+ var _editorApi$taskDecisi;
63
+ editorApi === null || editorApi === void 0 ? void 0 : (_editorApi$taskDecisi = editorApi.taskDecision) === null || _editorApi$taskDecisi === void 0 ? void 0 : _editorApi$taskDecisi.actions.setProvider(taskDecisionProvider);
64
+ }
65
+ }
66
+ }, [taskDecisionProvider, editorApi]);
58
67
  };
@@ -24,7 +24,9 @@ export default function handleProviders(providerFactory, {
24
24
  }, extensionProvider, quickInsertProvider) {
25
25
  providerFactory.setProvider('emojiProvider', emojiProvider);
26
26
  providerFactory.setProvider('mentionProvider', mentionProvider);
27
- providerFactory.setProvider('taskDecisionProvider', taskDecisionProvider);
27
+ if (!fg('platform_editor_td_provider_from_plugin_config')) {
28
+ providerFactory.setProvider('taskDecisionProvider', taskDecisionProvider);
29
+ }
28
30
  providerFactory.setProvider('contextIdentifierProvider', contextIdentifierProvider);
29
31
  providerFactory.setProvider('imageUploadProvider', imageUploadProvider);
30
32
  providerFactory.setProvider('collabEditProvider', collabEditProvider);
@@ -1,6 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import { injectIntl } from 'react-intl-next';
5
4
  import uuid from 'uuid/v4';
6
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, FULL_WIDTH_MODE, getAnalyticsEventsFromTransaction, PLATFORMS } from '@atlaskit/editor-common/analytics';
@@ -769,9 +768,6 @@ export class ReactEditorView extends React.Component {
769
768
  }) : this.editor);
770
769
  }
771
770
  }
772
- _defineProperty(ReactEditorView, "contextTypes", {
773
- getAtlaskitAnalyticsEventHandlers: PropTypes.func
774
- });
775
771
  function getUAPrefix() {
776
772
  if (browser.chrome) {
777
773
  return 'ua-chrome';
@@ -1,14 +1,62 @@
1
1
  import { Schema } from '@atlaskit/editor-prosemirror/model';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { sanitizeNodes } from '../utils/sanitizeNodes';
3
4
  import { fixExcludes } from './create-editor';
4
5
  import { sortByOrder } from './sort-by-order';
6
+ export const createGenericMetada = node => {
7
+ const commonAttributes = {
8
+ ['data-prosemirror-node-name']: node.type.name
9
+ };
10
+ if (!node.type.isBlock) {
11
+ return commonAttributes;
12
+ }
13
+ return {
14
+ ...commonAttributes,
15
+ ['data-prosemirror-node-block']: true
16
+ };
17
+ };
18
+ export const wrapToDOMProxy = toDOM => {
19
+ const toDOMProxy = new Proxy(toDOM, {
20
+ apply(target, thisArg, argumentsList) {
21
+ const result = Reflect.apply(target, thisArg, argumentsList);
22
+ if (!Array.isArray(result)) {
23
+ return result;
24
+ }
25
+ const node = argumentsList[0];
26
+ const hasAttributes = typeof result[1] === 'object' && !Array.isArray(result[1]);
27
+ if (hasAttributes) {
28
+ result[1] = Object.assign(result[1], createGenericMetada(node));
29
+ } else {
30
+ result.splice(1, 0, createGenericMetada(node));
31
+ }
32
+ return result;
33
+ }
34
+ });
35
+ return toDOMProxy;
36
+ };
37
+ export const wrapNodeSpecProxy = spec => {
38
+ const nodeSpecProxy = new Proxy(spec, {
39
+ get: function (target, prop, receiver) {
40
+ const result = Reflect.get(target, prop, receiver);
41
+ if (prop !== 'toDOM' || !result) {
42
+ return result;
43
+ }
44
+ return wrapToDOMProxy(result);
45
+ }
46
+ });
47
+ return nodeSpecProxy;
48
+ };
5
49
  export function createSchema(editorConfig) {
6
50
  const marks = fixExcludes(editorConfig.marks.sort(sortByOrder('marks')).reduce((acc, mark) => {
7
51
  acc[mark.name] = mark.mark;
8
52
  return acc;
9
53
  }, {}));
10
54
  const nodes = sanitizeNodes(editorConfig.nodes.sort(sortByOrder('nodes')).reduce((acc, node) => {
11
- acc[node.name] = node.node;
55
+ if (fg('platform_editor_breakout_use_css')) {
56
+ acc[node.name] = wrapNodeSpecProxy(node.node);
57
+ } else {
58
+ acc[node.name] = node.node;
59
+ }
12
60
  return acc;
13
61
  }, {}), marks);
14
62
  return new Schema({
@@ -156,6 +156,7 @@ export default function createUniversalPresetInternal({
156
156
  allowNestedTasks: props.allowNestedTasks,
157
157
  consumeTabs: isFullPage,
158
158
  useLongPressSelection: false,
159
+ taskDecisionProvider: props.taskDecisionProvider,
159
160
  ...(initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.tasksAndDecisionsPlugin)
160
161
  }], Boolean(props.allowTasksAndDecisions || props.taskDecisionProvider)).maybeAdd([feedbackDialogPlugin, {
161
162
  coreVersion,
@@ -200,8 +200,17 @@ const contentStyles = props => css`
200
200
  );
201
201
  }
202
202
 
203
+ .ProseMirror {
204
+ --ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));
205
+ }
206
+
207
+ /* We can't allow nodes that are inside other nodes to bleed from the parent container */
208
+ .ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {
209
+ --ak-editor-max-container-width: 100%;
210
+ }
211
+
203
212
  /* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */
204
- @container editor-area (min-width: ${akEditorBreakpointForSmallDevice}) {
213
+ @container editor-area (width >= ${akEditorBreakpointForSmallDevice}) {
205
214
  .ProseMirror {
206
215
  --ak-editor--breakout-wide-layout-width: ${akEditorCalculatedWideLayoutWidth}px;
207
216
  }
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "198.3.2";
2
+ export const version = "198.4.1";
@@ -176,7 +176,8 @@ function ReactEditorViewContextWrapper(props) {
176
176
  mediaProvider: (_media = props.editorProps.media) === null || _media === void 0 ? void 0 : _media.provider,
177
177
  cardProvider: ((_linking = props.editorProps.linking) === null || _linking === void 0 || (_linking = _linking.smartLinks) === null || _linking === void 0 ? void 0 : _linking.provider) || smartLinks && smartLinks.provider || UNSAFE_cards && UNSAFE_cards.provider,
178
178
  emojiProvider: props.editorProps.emojiProvider,
179
- autoformattingProvider: props.editorProps.autoformattingProvider
179
+ autoformattingProvider: props.editorProps.autoformattingProvider,
180
+ taskDecisionProvider: props.editorProps.taskDecisionProvider
180
181
  });
181
182
  return jsx(ReactEditorView, _extends({}, props, {
182
183
  editorAPI: editorAPI,
@@ -16,7 +16,8 @@ export var useProviders = function useProviders(_ref) {
16
16
  mediaProvider = _ref.mediaProvider,
17
17
  cardProvider = _ref.cardProvider,
18
18
  emojiProvider = _ref.emojiProvider,
19
- autoformattingProvider = _ref.autoformattingProvider;
19
+ autoformattingProvider = _ref.autoformattingProvider,
20
+ taskDecisionProvider = _ref.taskDecisionProvider;
20
21
  useEffect(function () {
21
22
  function setProvider() {
22
23
  return _setProvider.apply(this, arguments);
@@ -77,4 +78,12 @@ export var useProviders = function useProviders(_ref) {
77
78
  }
78
79
  }
79
80
  }, [autoformattingProvider, editorApi]);
81
+ useEffect(function () {
82
+ if (fg('platform_editor_td_provider_from_plugin_config')) {
83
+ if (taskDecisionProvider) {
84
+ var _editorApi$taskDecisi;
85
+ editorApi === null || editorApi === void 0 || (_editorApi$taskDecisi = editorApi.taskDecision) === null || _editorApi$taskDecisi === void 0 || _editorApi$taskDecisi.actions.setProvider(taskDecisionProvider);
86
+ }
87
+ }
88
+ }, [taskDecisionProvider, editorApi]);
80
89
  };
@@ -23,7 +23,9 @@ export default function handleProviders(providerFactory, _ref, extensionProvider
23
23
  searchProvider = _ref.searchProvider;
24
24
  providerFactory.setProvider('emojiProvider', emojiProvider);
25
25
  providerFactory.setProvider('mentionProvider', mentionProvider);
26
- providerFactory.setProvider('taskDecisionProvider', taskDecisionProvider);
26
+ if (!fg('platform_editor_td_provider_from_plugin_config')) {
27
+ providerFactory.setProvider('taskDecisionProvider', taskDecisionProvider);
28
+ }
27
29
  providerFactory.setProvider('contextIdentifierProvider', contextIdentifierProvider);
28
30
  providerFactory.setProvider('imageUploadProvider', imageUploadProvider);
29
31
  providerFactory.setProvider('collabEditProvider', collabEditProvider);
@@ -10,7 +10,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
- import PropTypes from 'prop-types';
14
13
  import { injectIntl } from 'react-intl-next';
15
14
  import uuid from 'uuid/v4';
16
15
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, FULL_WIDTH_MODE, getAnalyticsEventsFromTransaction, PLATFORMS } from '@atlaskit/editor-common/analytics';
@@ -820,9 +819,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
820
819
  }]);
821
820
  return ReactEditorView;
822
821
  }(React.Component);
823
- _defineProperty(ReactEditorView, "contextTypes", {
824
- getAtlaskitAnalyticsEventHandlers: PropTypes.func
825
- });
826
822
  function getUAPrefix() {
827
823
  if (browser.chrome) {
828
824
  return 'ua-chrome';
@@ -1,14 +1,61 @@
1
+ import _typeof from "@babel/runtime/helpers/typeof";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1
5
  import { Schema } from '@atlaskit/editor-prosemirror/model';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
2
7
  import { sanitizeNodes } from '../utils/sanitizeNodes';
3
8
  import { fixExcludes } from './create-editor';
4
9
  import { sortByOrder } from './sort-by-order';
10
+ export var createGenericMetada = function createGenericMetada(node) {
11
+ var commonAttributes = _defineProperty({}, 'data-prosemirror-node-name', node.type.name);
12
+ if (!node.type.isBlock) {
13
+ return commonAttributes;
14
+ }
15
+ return _objectSpread(_objectSpread({}, commonAttributes), {}, _defineProperty({}, 'data-prosemirror-node-block', true));
16
+ };
17
+ export var wrapToDOMProxy = function wrapToDOMProxy(toDOM) {
18
+ var toDOMProxy = new Proxy(toDOM, {
19
+ apply: function apply(target, thisArg, argumentsList) {
20
+ var result = Reflect.apply(target, thisArg, argumentsList);
21
+ if (!Array.isArray(result)) {
22
+ return result;
23
+ }
24
+ var node = argumentsList[0];
25
+ var hasAttributes = _typeof(result[1]) === 'object' && !Array.isArray(result[1]);
26
+ if (hasAttributes) {
27
+ result[1] = Object.assign(result[1], createGenericMetada(node));
28
+ } else {
29
+ result.splice(1, 0, createGenericMetada(node));
30
+ }
31
+ return result;
32
+ }
33
+ });
34
+ return toDOMProxy;
35
+ };
36
+ export var wrapNodeSpecProxy = function wrapNodeSpecProxy(spec) {
37
+ var nodeSpecProxy = new Proxy(spec, {
38
+ get: function get(target, prop, receiver) {
39
+ var result = Reflect.get(target, prop, receiver);
40
+ if (prop !== 'toDOM' || !result) {
41
+ return result;
42
+ }
43
+ return wrapToDOMProxy(result);
44
+ }
45
+ });
46
+ return nodeSpecProxy;
47
+ };
5
48
  export function createSchema(editorConfig) {
6
49
  var marks = fixExcludes(editorConfig.marks.sort(sortByOrder('marks')).reduce(function (acc, mark) {
7
50
  acc[mark.name] = mark.mark;
8
51
  return acc;
9
52
  }, {}));
10
53
  var nodes = sanitizeNodes(editorConfig.nodes.sort(sortByOrder('nodes')).reduce(function (acc, node) {
11
- acc[node.name] = node.node;
54
+ if (fg('platform_editor_breakout_use_css')) {
55
+ acc[node.name] = wrapNodeSpecProxy(node.node);
56
+ } else {
57
+ acc[node.name] = node.node;
58
+ }
12
59
  return acc;
13
60
  }, {}), marks);
14
61
  return new Schema({
@@ -155,7 +155,8 @@ export default function createUniversalPresetInternal(_ref) {
155
155
  }, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.tablesPlugin)], Boolean(props.allowTables)).maybeAdd([tasksAndDecisionsPlugin, _objectSpread({
156
156
  allowNestedTasks: props.allowNestedTasks,
157
157
  consumeTabs: isFullPage,
158
- useLongPressSelection: false
158
+ useLongPressSelection: false,
159
+ taskDecisionProvider: props.taskDecisionProvider
159
160
  }, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.tasksAndDecisionsPlugin)], Boolean(props.allowTasksAndDecisions || props.taskDecisionProvider)).maybeAdd([feedbackDialogPlugin, _objectSpread({
160
161
  coreVersion: coreVersion
161
162
  }, props.feedbackInfo)], Boolean(props.feedbackInfo)).maybeAdd([helpDialogPlugin, !!props.legacyImageUploadProvider], Boolean(props.allowHelpDialog)).maybeAdd([saveOnEnterPlugin, props.onSave], Boolean(props.saveOnEnter && props.onSave)).maybeAdd(imageUploadPlugin, Boolean(props.legacyImageUploadProvider)).maybeAdd(
@@ -78,7 +78,7 @@ export var fixBlockControlStylesSSR = function fixBlockControlStylesSSR() {
78
78
  // The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
79
79
  var akEditorBreakpointForSmallDevice = "1266px";
80
80
  var contentStyles = function contentStyles(props) {
81
- return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: 52px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (min-width: ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t", "\n\n\t", "\n\t", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Link icon in the Atlaskit package\n is bigger than the others\n */\n\t.hyperlink-open-link {\n\t\tsvg {\n\t\t\tmax-width: 18px;\n\t\t}\n\t\t&[href] {\n\t\t\tpadding: 0 4px;\n\t\t}\n\t}\n"])), akEditorGutterPadding, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, editorFontSize({
81
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: 52px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t", "\n\n\t", "\n\t", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Link icon in the Atlaskit package\n is bigger than the others\n */\n\t.hyperlink-open-link {\n\t\tsvg {\n\t\t\tmax-width: 18px;\n\t\t}\n\t\t&[href] {\n\t\t\tpadding: 0 4px;\n\t\t}\n\t}\n"])), akEditorGutterPadding, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, editorFontSize({
82
82
  theme: props.theme
83
83
  }), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, fg('editor_request_to_edit_task') ? null : css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), "var(--ds-border-focused, #8cf)", fg('platform_editor_mark_boundary_cursor') ? css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t"]))) : null, placeholderTextStyles, placeholderStyles, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, backgroundColorStyles(), listsStyles, ruleStyles(), mediaStyles, layoutStyles(props.viewMode), telepointerStyle, gapCursorStyles, panelStyles(), mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), findReplaceStyles, textHighlightStyle, taskDecisionStyles, statusStyles, annotationSharedStyles(), smartCardStyles(), smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, aiPanelStyles(props.colorMode), fixBlockControlStylesSSR(), MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
84
84
  };
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "198.3.2";
2
+ export var version = "198.4.1";
@@ -5,20 +5,24 @@ import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugins/context-i
5
5
  import { type CustomAutoformatPlugin } from '@atlaskit/editor-plugins/custom-autoformat';
6
6
  import { type EmojiPlugin } from '@atlaskit/editor-plugins/emoji';
7
7
  import type { MediaPlugin } from '@atlaskit/editor-plugins/media';
8
+ import { type TasksAndDecisionsPlugin } from '@atlaskit/editor-plugins/tasks-and-decisions';
8
9
  import { type EmojiProvider } from '@atlaskit/emoji';
10
+ import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
9
11
  interface UseProvidersProps {
10
12
  editorApi: PublicPluginAPI<[
11
13
  OptionalPlugin<ContextIdentifierPlugin>,
12
14
  OptionalPlugin<MediaPlugin>,
13
15
  OptionalPlugin<CardPlugin>,
14
16
  OptionalPlugin<EmojiPlugin>,
15
- OptionalPlugin<CustomAutoformatPlugin>
17
+ OptionalPlugin<CustomAutoformatPlugin>,
18
+ OptionalPlugin<TasksAndDecisionsPlugin>
16
19
  ]> | undefined;
17
20
  contextIdentifierProvider: Promise<ContextIdentifierProvider> | undefined;
18
21
  mediaProvider: Promise<MediaProvider> | undefined;
19
22
  cardProvider: Promise<CardProvider> | undefined;
20
23
  emojiProvider: Promise<EmojiProvider> | undefined;
21
24
  autoformattingProvider: Promise<AutoformattingProvider> | undefined;
25
+ taskDecisionProvider: Promise<TaskDecisionProvider> | undefined;
22
26
  }
23
27
  /**
24
28
  * This hook is used to replace the old approach of using the `providerFactory`.
@@ -28,5 +32,5 @@ interface UseProvidersProps {
28
32
  *
29
33
  * In the future ideally consumers implement this behaviour themselves.
30
34
  */
31
- export declare const useProviders: ({ editorApi, contextIdentifierProvider, mediaProvider, cardProvider, emojiProvider, autoformattingProvider, }: UseProvidersProps) => void;
35
+ export declare const useProviders: ({ editorApi, contextIdentifierProvider, mediaProvider, cardProvider, emojiProvider, autoformattingProvider, taskDecisionProvider, }: UseProvidersProps) => void;
32
36
  export {};
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import type { WrappedComponentProps } from 'react-intl-next';
4
3
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
5
4
  import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
@@ -74,9 +73,6 @@ export declare class ReactEditorView<T = {}> extends React.Component<EditorViewP
74
73
  transactionTracker: TransactionTracker;
75
74
  experienceStore?: ExperienceStore;
76
75
  editorRef: React.RefObject<HTMLDivElement>;
77
- static contextTypes: {
78
- getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
79
- };
80
76
  private canDispatchTransactions;
81
77
  private focusTimeoutId?;
82
78
  private reliabilityInterval?;
@@ -1,6 +1,17 @@
1
+ import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
1
2
  import { Schema } from '@atlaskit/editor-prosemirror/model';
2
3
  import type { MarkConfig, NodeConfig } from '../types/pm-config';
4
+ export declare const createGenericMetada: (node: PMNode) => {
5
+ "data-prosemirror-node-name": string;
6
+ } | {
7
+ "data-prosemirror-node-block": boolean;
8
+ "data-prosemirror-node-name": string;
9
+ };
10
+ type toDOMType = (node: PMNode) => DOMOutputSpec;
11
+ export declare const wrapToDOMProxy: (toDOM: toDOMType) => toDOMType;
12
+ export declare const wrapNodeSpecProxy: (spec: NodeSpec) => NodeSpec;
3
13
  export declare function createSchema(editorConfig: {
4
14
  marks: MarkConfig[];
5
15
  nodes: NodeConfig[];
6
16
  }): Schema<string, string>;
17
+ export {};