@atlaskit/editor-common 110.9.3 → 110.10.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 (35) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-dev-agents/tsconfig.json +3 -0
  4. package/afm-jira/tsconfig.json +3 -0
  5. package/afm-passionfruit/tsconfig.json +3 -0
  6. package/afm-post-office/tsconfig.json +3 -0
  7. package/afm-rovo-extension/tsconfig.json +3 -0
  8. package/afm-townsquare/tsconfig.json +3 -0
  9. package/dist/cjs/editor-analytics/withAnalytics.js +10 -1
  10. package/dist/cjs/messages/block-type.js +10 -0
  11. package/dist/cjs/monitoring/error.js +1 -1
  12. package/dist/cjs/resizer/BreakoutResizer.js +3 -10
  13. package/dist/cjs/ui/DropList/index.js +1 -1
  14. package/dist/cjs/utils/input-rules.js +2 -2
  15. package/dist/es2019/editor-analytics/withAnalytics.js +10 -1
  16. package/dist/es2019/messages/block-type.js +10 -0
  17. package/dist/es2019/monitoring/error.js +1 -1
  18. package/dist/es2019/resizer/BreakoutResizer.js +3 -10
  19. package/dist/es2019/ui/DropList/index.js +1 -1
  20. package/dist/es2019/utils/input-rules.js +1 -1
  21. package/dist/esm/editor-analytics/withAnalytics.js +10 -1
  22. package/dist/esm/messages/block-type.js +10 -0
  23. package/dist/esm/monitoring/error.js +1 -1
  24. package/dist/esm/resizer/BreakoutResizer.js +3 -10
  25. package/dist/esm/ui/DropList/index.js +1 -1
  26. package/dist/esm/utils/input-rules.js +1 -1
  27. package/dist/types/analytics/types/events.d.ts +5 -0
  28. package/dist/types/editor-analytics/withAnalytics.d.ts +11 -1
  29. package/dist/types/messages/block-type.d.ts +10 -0
  30. package/dist/types/provider-factory/quick-insert-provider.d.ts +1 -1
  31. package/dist/types-ts4.5/analytics/types/events.d.ts +5 -0
  32. package/dist/types-ts4.5/editor-analytics/withAnalytics.d.ts +11 -1
  33. package/dist/types-ts4.5/messages/block-type.d.ts +10 -0
  34. package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +1 -1
  35. package/package.json +5 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a4db0a2351f7d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a4db0a2351f7d) -
8
+ [ux] ED-29502 Add plain text quick insert option to codeBlockPlugin
9
+ - [`c74a1bd9f8e48`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c74a1bd9f8e48) -
10
+ EDITOR-1818: extend undo analytics to describe attribute changes. This is to help us investigate
11
+ undos that have no visible effects
12
+ - Updated dependencies
13
+
14
+ ## 110.10.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`0ac75e0d28c72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0ac75e0d28c72) -
19
+ Migrate @atlaskit/editor-prosemirror/history to @atlaskit/prosemirror-history package
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 110.9.3
4
26
 
5
27
  ### Patch Changes
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-cc/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-cc/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-cc/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-dev-agents/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-dev-agents/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-dev-agents/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-jira/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-jira/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-jira/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-passionfruit/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-passionfruit/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-passionfruit/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-post-office/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-post-office/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-post-office/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-rovo-extension/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-rovo-extension/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-rovo-extension/tsconfig.json"
148
151
  },
@@ -143,6 +143,9 @@
143
143
  {
144
144
  "path": "../../../people-and-teams/profilecard/afm-townsquare/tsconfig.json"
145
145
  },
146
+ {
147
+ "path": "../../prosemirror-history/afm-townsquare/tsconfig.json"
148
+ },
146
149
  {
147
150
  "path": "../../../react-ufo/atlaskit/afm-townsquare/tsconfig.json"
148
151
  },
@@ -4,6 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.withAnalytics = withAnalytics;
7
+ /**
8
+ * Meta information that can be passed to the analytics payload callback
9
+ *
10
+ * @param currentDoc - Current document node after the transaction
11
+ */
12
+
7
13
  /**
8
14
  * Callback accepts EditorState
9
15
  *
@@ -13,6 +19,7 @@ exports.withAnalytics = withAnalytics;
13
19
  * Also in cases where Analytics fails to load, the editor doesn't crash.
14
20
  *
15
21
  * @param state - EditorState, passed to the callback
22
+ * @param meta - Meta, passed to the callback
16
23
  */
17
24
 
18
25
  /**
@@ -39,7 +46,9 @@ function withAnalytics(analyticsApi, payload, channel) {
39
46
  return command(state, function (tr) {
40
47
  if (dispatch) {
41
48
  if (payload instanceof Function) {
42
- var dynamicPayload = payload(state);
49
+ var dynamicPayload = payload(state, {
50
+ currentDoc: tr.doc
51
+ });
43
52
  if (dynamicPayload) {
44
53
  analyticsApi === null || analyticsApi === void 0 || analyticsApi.attachAnalyticsEvent(dynamicPayload, channel)(tr);
45
54
  dispatch(tr);
@@ -91,6 +91,16 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
91
91
  defaultMessage: 'Display code with syntax highlighting',
92
92
  description: 'Insert a snippet/segment of code (code block)'
93
93
  },
94
+ plainTextCodeblock: {
95
+ id: 'fabric.editor.plainTextCodeblock',
96
+ defaultMessage: 'Plain text',
97
+ description: 'Insert a snippet/segment of code block as plain text'
98
+ },
99
+ plainTextCodeblockDescription: {
100
+ id: 'fabric.editor.plainTextCodeblock.description',
101
+ defaultMessage: 'Insert code block for plain text',
102
+ description: 'Insert a snippet/segment of code block as plain text'
103
+ },
94
104
  infoPanel: {
95
105
  id: 'fabric.editor.infoPanel',
96
106
  defaultMessage: 'Info panel',
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "110.9.2";
19
+ var packageVersion = "110.10.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -63,17 +63,10 @@ var getHandleStyle = function getHandleStyle(node, hidden) {
63
63
  }
64
64
  };
65
65
  var ignoreResizerMutations = exports.ignoreResizerMutations = function ignoreResizerMutations(mutation) {
66
- if ((0, _platformFeatureFlags.fg)('platform_editor_breakoutresizer_remove_assertion')) {
67
- if (mutation.target instanceof Element) {
68
- return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
69
- }
70
- return mutation.type === 'attributes' && mutation.attributeName === 'style';
71
- } else {
72
- return (
73
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
74
- mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style'
75
- );
66
+ if (mutation.target instanceof Element) {
67
+ return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
76
68
  }
69
+ return mutation.type === 'attributes' && mutation.attributeName === 'style';
77
70
  };
78
71
  var resizingStyles = {
79
72
  left: '50%',
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "110.9.2";
27
+ var packageVersion = "110.10.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.inputRuleWithAnalytics = exports.createWrappingJoinRule = exports.createRule = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _history = require("@atlaskit/editor-prosemirror/history");
10
9
  var _transform = require("@atlaskit/editor-prosemirror/transform");
10
+ var _prosemirrorHistory = require("@atlaskit/prosemirror-history");
11
11
  var _analytics = require("../analytics");
12
12
  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; }
13
13
  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; }
@@ -66,7 +66,7 @@ var createRule = exports.createRule = function createRule(match, handler) {
66
66
  match: match,
67
67
  handler: handler,
68
68
  onHandlerApply: function onHandlerApply(_state, tr) {
69
- (0, _history.closeHistory)(tr);
69
+ (0, _prosemirrorHistory.closeHistory)(tr);
70
70
  }
71
71
  };
72
72
  };
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Meta information that can be passed to the analytics payload callback
3
+ *
4
+ * @param currentDoc - Current document node after the transaction
5
+ */
6
+
1
7
  /**
2
8
  * Callback accepts EditorState
3
9
  *
@@ -7,6 +13,7 @@
7
13
  * Also in cases where Analytics fails to load, the editor doesn't crash.
8
14
  *
9
15
  * @param state - EditorState, passed to the callback
16
+ * @param meta - Meta, passed to the callback
10
17
  */
11
18
 
12
19
  /**
@@ -31,7 +38,9 @@ export function withAnalytics(analyticsApi, payload, channel) {
31
38
  return command => (state, dispatch, view) => command(state, tr => {
32
39
  if (dispatch) {
33
40
  if (payload instanceof Function) {
34
- const dynamicPayload = payload(state);
41
+ const dynamicPayload = payload(state, {
42
+ currentDoc: tr.doc
43
+ });
35
44
  if (dynamicPayload) {
36
45
  analyticsApi === null || analyticsApi === void 0 ? void 0 : analyticsApi.attachAnalyticsEvent(dynamicPayload, channel)(tr);
37
46
  dispatch(tr);
@@ -85,6 +85,16 @@ export const messages = defineMessages({
85
85
  defaultMessage: 'Display code with syntax highlighting',
86
86
  description: 'Insert a snippet/segment of code (code block)'
87
87
  },
88
+ plainTextCodeblock: {
89
+ id: 'fabric.editor.plainTextCodeblock',
90
+ defaultMessage: 'Plain text',
91
+ description: 'Insert a snippet/segment of code block as plain text'
92
+ },
93
+ plainTextCodeblockDescription: {
94
+ id: 'fabric.editor.plainTextCodeblock.description',
95
+ defaultMessage: 'Insert code block for plain text',
96
+ description: 'Insert a snippet/segment of code block as plain text'
97
+ },
88
98
  infoPanel: {
89
99
  id: 'fabric.editor.infoPanel',
90
100
  defaultMessage: 'Info panel',
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "110.9.2";
4
+ const packageVersion = "110.10.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -53,17 +53,10 @@ const getHandleStyle = (node, hidden) => {
53
53
  }
54
54
  };
55
55
  export const ignoreResizerMutations = mutation => {
56
- if (fg('platform_editor_breakoutresizer_remove_assertion')) {
57
- if (mutation.target instanceof Element) {
58
- return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
59
- }
60
- return mutation.type === 'attributes' && mutation.attributeName === 'style';
61
- } else {
62
- return (
63
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
64
- mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style'
65
- );
56
+ if (mutation.target instanceof Element) {
57
+ return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
66
58
  }
59
+ return mutation.type === 'attributes' && mutation.attributeName === 'style';
67
60
  };
68
61
  const resizingStyles = {
69
62
  left: '50%',
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "110.9.2";
17
+ const packageVersion = "110.10.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,5 +1,5 @@
1
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
2
1
  import { canJoin, findWrapping } from '@atlaskit/editor-prosemirror/transform';
2
+ import { closeHistory } from '@atlaskit/prosemirror-history';
3
3
  import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '../analytics';
4
4
  // Roughly based on atlassian-frontend/packages/editor/editor-core/src/utils/input-rules.ts but with the Editor Analytics API that's injected in plugins
5
5
  export const inputRuleWithAnalytics = (getPayload, analyticsApi) => {
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Meta information that can be passed to the analytics payload callback
3
+ *
4
+ * @param currentDoc - Current document node after the transaction
5
+ */
6
+
1
7
  /**
2
8
  * Callback accepts EditorState
3
9
  *
@@ -7,6 +13,7 @@
7
13
  * Also in cases where Analytics fails to load, the editor doesn't crash.
8
14
  *
9
15
  * @param state - EditorState, passed to the callback
16
+ * @param meta - Meta, passed to the callback
10
17
  */
11
18
 
12
19
  /**
@@ -33,7 +40,9 @@ export function withAnalytics(analyticsApi, payload, channel) {
33
40
  return command(state, function (tr) {
34
41
  if (dispatch) {
35
42
  if (payload instanceof Function) {
36
- var dynamicPayload = payload(state);
43
+ var dynamicPayload = payload(state, {
44
+ currentDoc: tr.doc
45
+ });
37
46
  if (dynamicPayload) {
38
47
  analyticsApi === null || analyticsApi === void 0 || analyticsApi.attachAnalyticsEvent(dynamicPayload, channel)(tr);
39
48
  dispatch(tr);
@@ -85,6 +85,16 @@ export var messages = defineMessages({
85
85
  defaultMessage: 'Display code with syntax highlighting',
86
86
  description: 'Insert a snippet/segment of code (code block)'
87
87
  },
88
+ plainTextCodeblock: {
89
+ id: 'fabric.editor.plainTextCodeblock',
90
+ defaultMessage: 'Plain text',
91
+ description: 'Insert a snippet/segment of code block as plain text'
92
+ },
93
+ plainTextCodeblockDescription: {
94
+ id: 'fabric.editor.plainTextCodeblock.description',
95
+ defaultMessage: 'Insert code block for plain text',
96
+ description: 'Insert a snippet/segment of code block as plain text'
97
+ },
88
98
  infoPanel: {
89
99
  id: 'fabric.editor.infoPanel',
90
100
  defaultMessage: 'Info panel',
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "110.9.2";
10
+ var packageVersion = "110.10.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -54,17 +54,10 @@ var getHandleStyle = function getHandleStyle(node, hidden) {
54
54
  }
55
55
  };
56
56
  export var ignoreResizerMutations = function ignoreResizerMutations(mutation) {
57
- if (fg('platform_editor_breakoutresizer_remove_assertion')) {
58
- if (mutation.target instanceof Element) {
59
- return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
60
- }
61
- return mutation.type === 'attributes' && mutation.attributeName === 'style';
62
- } else {
63
- return (
64
- // eslint-disable-next-line @atlaskit/editor/no-as-casting
65
- mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style'
66
- );
57
+ if (mutation.target instanceof Element) {
58
+ return mutation.target.classList.contains('resizer-item') || mutation.type === 'attributes' && mutation.attributeName === 'style';
67
59
  }
60
+ return mutation.type === 'attributes' && mutation.attributeName === 'style';
68
61
  };
69
62
  var resizingStyles = {
70
63
  left: '50%',
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "110.9.2";
24
+ var packageVersion = "110.10.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,8 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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; }
4
- import { closeHistory } from '@atlaskit/editor-prosemirror/history';
5
4
  import { canJoin, findWrapping } from '@atlaskit/editor-prosemirror/transform';
5
+ import { closeHistory } from '@atlaskit/prosemirror-history';
6
6
  import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '../analytics';
7
7
  // Roughly based on atlassian-frontend/packages/editor/editor-core/src/utils/input-rules.ts but with the Editor Analytics API that's injected in plugins
8
8
  export var inputRuleWithAnalytics = function inputRuleWithAnalytics(getPayload, analyticsApi) {
@@ -81,6 +81,11 @@ type MBEEventPayload = TrackAEP<ACTION.ADD_CHILD | ACTION.CHANGE_ACTIVE | ACTION
81
81
  localId: string;
82
82
  }, undefined>;
83
83
  type UndoRedoAEP = TrackAEP<ACTION.UNDO_PERFORMED | ACTION.REDO_PERFORMED, ACTION_SUBJECT.EDITOR, undefined, {
84
+ affectedNodes?: {
85
+ attributes: string[];
86
+ type: string;
87
+ }[];
88
+ hasChanged?: boolean;
84
89
  inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.EXTERNAL;
85
90
  }, undefined>;
86
91
  export type AnalyticsEventPayloadWithChannel = {
@@ -1,6 +1,15 @@
1
+ import type { Node } from '@atlaskit/editor-prosemirror/model';
1
2
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
3
  import type { AnalyticsEventPayload, EditorAnalyticsAPI } from '../analytics';
3
4
  import type { HigherOrderCommand } from '../types';
5
+ /**
6
+ * Meta information that can be passed to the analytics payload callback
7
+ *
8
+ * @param currentDoc - Current document node after the transaction
9
+ */
10
+ interface Meta {
11
+ currentDoc: Node;
12
+ }
4
13
  /**
5
14
  * Callback accepts EditorState
6
15
  *
@@ -10,8 +19,9 @@ import type { HigherOrderCommand } from '../types';
10
19
  * Also in cases where Analytics fails to load, the editor doesn't crash.
11
20
  *
12
21
  * @param state - EditorState, passed to the callback
22
+ * @param meta - Meta, passed to the callback
13
23
  */
14
- type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
24
+ type AnalyticsEventPayloadCallback = (state: EditorState, meta: Meta) => AnalyticsEventPayload | undefined;
15
25
  /**
16
26
  * Analytics API
17
27
  * @example
@@ -84,6 +84,16 @@ export declare const messages: {
84
84
  defaultMessage: string;
85
85
  description: string;
86
86
  };
87
+ plainTextCodeblock: {
88
+ id: string;
89
+ defaultMessage: string;
90
+ description: string;
91
+ };
92
+ plainTextCodeblockDescription: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
87
97
  infoPanel: {
88
98
  id: string;
89
99
  defaultMessage: string;
@@ -5,7 +5,7 @@ import type { TypeAheadItem } from '../types/type-ahead';
5
5
  export type QuickInsertActionInsert = (node?: Node | Record<string, any> | string, opts?: {
6
6
  selectInlineNode?: boolean;
7
7
  }) => Transaction;
8
- export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout' | 'syncBlock';
8
+ export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout' | 'syncBlock' | 'plainText';
9
9
  export type QuickInsertItem = TypeAheadItem & {
10
10
  /**
11
11
  * What to do on insert
@@ -81,6 +81,11 @@ type MBEEventPayload = TrackAEP<ACTION.ADD_CHILD | ACTION.CHANGE_ACTIVE | ACTION
81
81
  localId: string;
82
82
  }, undefined>;
83
83
  type UndoRedoAEP = TrackAEP<ACTION.UNDO_PERFORMED | ACTION.REDO_PERFORMED, ACTION_SUBJECT.EDITOR, undefined, {
84
+ affectedNodes?: {
85
+ attributes: string[];
86
+ type: string;
87
+ }[];
88
+ hasChanged?: boolean;
84
89
  inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.EXTERNAL;
85
90
  }, undefined>;
86
91
  export type AnalyticsEventPayloadWithChannel = {
@@ -1,6 +1,15 @@
1
+ import type { Node } from '@atlaskit/editor-prosemirror/model';
1
2
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
3
  import type { AnalyticsEventPayload, EditorAnalyticsAPI } from '../analytics';
3
4
  import type { HigherOrderCommand } from '../types';
5
+ /**
6
+ * Meta information that can be passed to the analytics payload callback
7
+ *
8
+ * @param currentDoc - Current document node after the transaction
9
+ */
10
+ interface Meta {
11
+ currentDoc: Node;
12
+ }
4
13
  /**
5
14
  * Callback accepts EditorState
6
15
  *
@@ -10,8 +19,9 @@ import type { HigherOrderCommand } from '../types';
10
19
  * Also in cases where Analytics fails to load, the editor doesn't crash.
11
20
  *
12
21
  * @param state - EditorState, passed to the callback
22
+ * @param meta - Meta, passed to the callback
13
23
  */
14
- type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
24
+ type AnalyticsEventPayloadCallback = (state: EditorState, meta: Meta) => AnalyticsEventPayload | undefined;
15
25
  /**
16
26
  * Analytics API
17
27
  * @example
@@ -84,6 +84,16 @@ export declare const messages: {
84
84
  defaultMessage: string;
85
85
  description: string;
86
86
  };
87
+ plainTextCodeblock: {
88
+ id: string;
89
+ defaultMessage: string;
90
+ description: string;
91
+ };
92
+ plainTextCodeblockDescription: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
87
97
  infoPanel: {
88
98
  id: string;
89
99
  defaultMessage: string;
@@ -5,7 +5,7 @@ import type { TypeAheadItem } from '../types/type-ahead';
5
5
  export type QuickInsertActionInsert = (node?: Node | Record<string, any> | string, opts?: {
6
6
  selectInlineNode?: boolean;
7
7
  }) => Transaction;
8
- export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout' | 'syncBlock';
8
+ export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout' | 'syncBlock' | 'plainText';
9
9
  export type QuickInsertItem = TypeAheadItem & {
10
10
  /**
11
11
  * What to do on insert
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.9.3",
3
+ "version": "110.10.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/code": "^17.2.0",
42
42
  "@atlaskit/codemod-utils": "^4.2.0",
43
43
  "@atlaskit/css": "^0.14.0",
44
- "@atlaskit/custom-steps": "^0.14.0",
44
+ "@atlaskit/custom-steps": "^0.15.0",
45
45
  "@atlaskit/dropdown-menu": "^16.3.0",
46
46
  "@atlaskit/editor-json-transformer": "^8.30.0",
47
47
  "@atlaskit/editor-palette": "^2.1.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/icon-object": "^7.2.0",
56
56
  "@atlaskit/link": "^3.2.0",
57
57
  "@atlaskit/link-datasource": "^4.25.0",
58
- "@atlaskit/link-picker": "^3.15.0",
58
+ "@atlaskit/link-picker": "^3.16.0",
59
59
  "@atlaskit/media-card": "^79.5.0",
60
60
  "@atlaskit/media-client": "^35.5.0",
61
61
  "@atlaskit/media-client-react": "^4.1.0",
@@ -72,6 +72,7 @@
72
72
  "@atlaskit/popper": "^7.1.0",
73
73
  "@atlaskit/primitives": "^14.15.0",
74
74
  "@atlaskit/profilecard": "^24.18.0",
75
+ "@atlaskit/prosemirror-history": "^0.2.0",
75
76
  "@atlaskit/react-ufo": "^4.11.0",
76
77
  "@atlaskit/section-message": "^8.7.0",
77
78
  "@atlaskit/smart-card": "^43.1.0",
@@ -81,7 +82,7 @@
81
82
  "@atlaskit/task-decision": "^19.2.0",
82
83
  "@atlaskit/textfield": "^8.0.0",
83
84
  "@atlaskit/theme": "^21.0.0",
84
- "@atlaskit/tmp-editor-statsig": "^13.6.0",
85
+ "@atlaskit/tmp-editor-statsig": "^13.7.0",
85
86
  "@atlaskit/tokens": "^6.4.0",
86
87
  "@atlaskit/tooltip": "^20.5.0",
87
88
  "@atlaskit/width-detector": "^5.0.0",
@@ -184,9 +185,6 @@
184
185
  "platform-visual-refresh-icons": {
185
186
  "type": "boolean"
186
187
  },
187
- "platform_editor_breakoutresizer_remove_assertion": {
188
- "type": "boolean"
189
- },
190
188
  "platform-component-visual-refresh": {
191
189
  "type": "boolean"
192
190
  },
@@ -277,12 +275,6 @@
277
275
  "p2m-drop-down-motion": {
278
276
  "type": "boolean"
279
277
  },
280
- "platform_editor_resolve_hyperlinks_CONFLUENCE": {
281
- "type": "boolean"
282
- },
283
- "platform_editor_resolve_hyperlinks_JIRA": {
284
- "type": "boolean"
285
- },
286
278
  "platform_editor_resolve_hyperlinks_killswitch": {
287
279
  "type": "boolean"
288
280
  },