@atlaskit/editor-common 99.1.1 → 99.2.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 99.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#102499](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102499)
8
+ [`c1bfe8b68a35e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c1bfe8b68a35e) -
9
+ log obfuscated steps in collab provider when catchup out of sync
10
+
11
+ ## 99.1.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [#102045](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102045)
16
+ [`44f96aff22dd9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/44f96aff22dd9) -
17
+ [ED-26179] clean up platform_editor_elements_dnd_nested_table
18
+ - Updated dependencies
19
+
3
20
  ## 99.1.1
4
21
 
5
22
  ### Patch Changes
@@ -119,7 +119,11 @@ var DisconnectReason = exports.DisconnectReason = /*#__PURE__*/function (Disconn
119
119
  DisconnectReason["SOCKET_TIMEOUT"] = "SOCKET_TIMEOUT";
120
120
  DisconnectReason["UNKNOWN_DISCONNECT"] = "UNKNOWN_DISCONNECT";
121
121
  return DisconnectReason;
122
- }({});
122
+ }({}); // Match with ProseMirror: https://prosemirror.net/docs/ref/#transform.ReplaceStep
123
+ // Match with ProseMirror: https://prosemirror.net/docs/ref/#transform.ReplaceAroundStep
124
+ // Match with ProseMirror: https://prosemirror.net/docs/ref/#transform.AttrStep
125
+ //Intersection: NCS custom step type config in adf-schema
126
+ //Unions
123
127
  var telepointerColorStyle = function telepointerColorStyle(backgroundColor, textColor, index) {
124
128
  var _getGlobalTheme = (0, _tokens.getGlobalTheme)(),
125
129
  colorMode = _getGlobalTheme.colorMode;
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "99.1.1";
20
+ var packageVersion = "99.2.0";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -58,7 +58,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
58
58
 
59
59
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
60
60
  var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
61
- return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), (0, _experiments.editorExperiment)('table-nested-dnd', true) ? "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-250, 20px)") : "var(--ds-space-100, 8px)", _browser.browser.gecko || _browser.browser.ie || _browser.browser.mac && _browser.browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", (0, _platformFeatureFlags.fg)('platform_editor_nested_tables_renderer_styles') ? "// Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ".concat("var(--ds-surface, #FFFFFF)", ";\n\t\t\t}") : '', "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, transparent)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
61
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", _browser.browser.gecko || _browser.browser.ie || _browser.browser.mac && _browser.browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", (0, _platformFeatureFlags.fg)('platform_editor_nested_tables_renderer_styles') ? "// Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ".concat("var(--ds-surface, #FFFFFF)", ";\n\t\t\t}") : '', "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, transparent)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
62
62
  leftCoverWidth: "var(--ds-space-300, 24px)"
63
63
  }), "var(--ds-background-neutral, rgb(235, 237, 240))", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", (0, _editorSharedStyles.overflowShadow)({
64
64
  leftCoverWidth: "var(--ds-space-300, 24px)"
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "99.1.1";
26
+ var packageVersion = "99.2.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -128,6 +128,17 @@ export let DisconnectReason = /*#__PURE__*/function (DisconnectReason) {
128
128
  DisconnectReason["UNKNOWN_DISCONNECT"] = "UNKNOWN_DISCONNECT";
129
129
  return DisconnectReason;
130
130
  }({});
131
+
132
+ // Match with ProseMirror: https://prosemirror.net/docs/ref/#transform.ReplaceStep
133
+
134
+ // Match with ProseMirror: https://prosemirror.net/docs/ref/#transform.ReplaceAroundStep
135
+
136
+ // Match with ProseMirror: https://prosemirror.net/docs/ref/#transform.AttrStep
137
+
138
+ //Intersection: NCS custom step type config in adf-schema
139
+
140
+ //Unions
141
+
131
142
  const telepointerColorStyle = (backgroundColor, textColor, index) => {
132
143
  const {
133
144
  colorMode
@@ -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 = "99.1.1";
4
+ const packageVersion = "99.2.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -142,7 +142,7 @@ const tableSharedStyle = () => css`
142
142
  border-right-width: 0;
143
143
  border-bottom-width: 0;
144
144
 
145
- padding: ${editorExperiment('table-nested-dnd', true) ? `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-250, 20px)"}` : "var(--ds-space-100, 8px)"};
145
+ padding: ${"var(--ds-space-100, 8px)"};
146
146
  /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */
147
147
  ${browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : ''}
148
148
 
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "99.1.1";
16
+ const packageVersion = "99.2.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -130,6 +130,17 @@ export var DisconnectReason = /*#__PURE__*/function (DisconnectReason) {
130
130
  DisconnectReason["UNKNOWN_DISCONNECT"] = "UNKNOWN_DISCONNECT";
131
131
  return DisconnectReason;
132
132
  }({});
133
+
134
+ // Match with ProseMirror: https://prosemirror.net/docs/ref/#transform.ReplaceStep
135
+
136
+ // Match with ProseMirror: https://prosemirror.net/docs/ref/#transform.ReplaceAroundStep
137
+
138
+ // Match with ProseMirror: https://prosemirror.net/docs/ref/#transform.AttrStep
139
+
140
+ //Intersection: NCS custom step type config in adf-schema
141
+
142
+ //Unions
143
+
133
144
  var telepointerColorStyle = function telepointerColorStyle(backgroundColor, textColor, index) {
134
145
  var _getGlobalTheme = getGlobalTheme(),
135
146
  colorMode = _getGlobalTheme.colorMode;
@@ -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 = "99.1.1";
10
+ var packageVersion = "99.2.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -52,7 +52,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
52
52
 
53
53
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
54
54
  var tableSharedStyle = function tableSharedStyle() {
55
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), editorExperiment('table-nested-dnd', true) ? "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-250, 20px)") : "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", fg('platform_editor_nested_tables_renderer_styles') ? "// Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ".concat("var(--ds-surface, #FFFFFF)", ";\n\t\t\t}") : '', "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableToolbar, ")"), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
55
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", fg('platform_editor_nested_tables_renderer_styles') ? "// Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ".concat("var(--ds-surface, #FFFFFF)", ";\n\t\t\t}") : '', "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableToolbar, ")"), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
56
56
  leftCoverWidth: "var(--ds-space-300, 24px)"
57
57
  }), "var(--ds-background-neutral, rgb(235, 237, 240))", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", overflowShadow({
58
58
  leftCoverWidth: "var(--ds-space-300, 24px)"
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "99.1.1";
23
+ var packageVersion = "99.2.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -1,4 +1,5 @@
1
1
  import type { ReactElement } from 'react';
2
+ import { type BatchAttrsStep, type OverrideDocumentStepJSON as OverrideDocumentStep } from '@atlaskit/adf-schema/steps';
2
3
  import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
3
4
  import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
4
5
  import type { Step } from '@atlaskit/editor-prosemirror/transform';
@@ -252,7 +253,7 @@ type MarkJson = {
252
253
  [key: string]: any;
253
254
  };
254
255
  };
255
- type NodeJson = {
256
+ export type NodeJson = {
256
257
  type: string;
257
258
  attrs: {
258
259
  [key: string]: any;
@@ -266,16 +267,72 @@ type SliceJson = {
266
267
  openStart: number;
267
268
  openEnd: number;
268
269
  };
269
- export type StepJson = {
270
- stepType?: string;
271
- from?: number;
272
- to?: number;
273
- slice?: SliceJson;
270
+ export interface StepMetadata {
271
+ metadata?: {
272
+ source?: string;
273
+ stepId?: string;
274
+ prevStepId?: string;
275
+ rebased?: boolean;
276
+ traceId?: string;
277
+ reqId?: string;
278
+ schemaVersion?: string;
279
+ };
280
+ }
281
+ export interface BaseStepPM extends StepMetadata {
274
282
  clientId: number | string;
275
283
  userId: string;
276
- createdAt?: number;
284
+ stepType: string;
285
+ to?: number;
286
+ from?: number;
287
+ slice?: SliceJson;
288
+ }
289
+ export interface ReplaceStepPM extends BaseStepPM {
290
+ from: number;
291
+ to: number;
292
+ slice: SliceJson;
277
293
  structure?: boolean;
278
- };
294
+ }
295
+ export interface ReplaceAroundStepPM extends BaseStepPM {
296
+ from: number;
297
+ to: number;
298
+ gapFrom: number;
299
+ gapTo: number;
300
+ slice: SliceJson;
301
+ insert: number;
302
+ structure?: boolean;
303
+ }
304
+ export type InlineCommentStepPM = InlineCommentAddMarkStepPM | InlineCommentAddNodeMarkStepPM;
305
+ interface InlineCommentAddMarkStepPM extends BaseStepPM {
306
+ stepType: 'addMark';
307
+ from: number;
308
+ to: number;
309
+ mark?: {
310
+ type?: 'annotation';
311
+ attrs?: {
312
+ id?: string;
313
+ annotationType?: 'inlineComment';
314
+ };
315
+ };
316
+ }
317
+ export interface InlineCommentAddNodeMarkStepPM extends BaseStepPM {
318
+ stepType: 'addNodeMark';
319
+ pos: number;
320
+ mark?: {
321
+ type?: 'annotation';
322
+ attrs?: {
323
+ id?: string;
324
+ annotationType?: 'inlineComment';
325
+ };
326
+ };
327
+ }
328
+ export interface SetAttrsStepPM extends BaseStepPM {
329
+ stepType: 'setAttrs';
330
+ pos: number;
331
+ attrs: Record<string, unknown>;
332
+ }
333
+ export type BatchAttrsStepPM = BaseStepPM & BatchAttrsStep;
334
+ export type OverrideDocumentStepPM = BaseStepPM & OverrideDocumentStep;
335
+ export type StepJson = OverrideDocumentStepPM | ReplaceAroundStepPM | ReplaceStepPM | InlineCommentStepPM | SetAttrsStepPM;
279
336
  export interface CollabDataPayload extends CollabEventRemoteData {
280
337
  version: number;
281
338
  json: StepJson[];
@@ -1,4 +1,5 @@
1
1
  import type { ReactElement } from 'react';
2
+ import { type BatchAttrsStep, type OverrideDocumentStepJSON as OverrideDocumentStep } from '@atlaskit/adf-schema/steps';
2
3
  import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
3
4
  import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
4
5
  import type { Step } from '@atlaskit/editor-prosemirror/transform';
@@ -252,7 +253,7 @@ type MarkJson = {
252
253
  [key: string]: any;
253
254
  };
254
255
  };
255
- type NodeJson = {
256
+ export type NodeJson = {
256
257
  type: string;
257
258
  attrs: {
258
259
  [key: string]: any;
@@ -266,16 +267,72 @@ type SliceJson = {
266
267
  openStart: number;
267
268
  openEnd: number;
268
269
  };
269
- export type StepJson = {
270
- stepType?: string;
271
- from?: number;
272
- to?: number;
273
- slice?: SliceJson;
270
+ export interface StepMetadata {
271
+ metadata?: {
272
+ source?: string;
273
+ stepId?: string;
274
+ prevStepId?: string;
275
+ rebased?: boolean;
276
+ traceId?: string;
277
+ reqId?: string;
278
+ schemaVersion?: string;
279
+ };
280
+ }
281
+ export interface BaseStepPM extends StepMetadata {
274
282
  clientId: number | string;
275
283
  userId: string;
276
- createdAt?: number;
284
+ stepType: string;
285
+ to?: number;
286
+ from?: number;
287
+ slice?: SliceJson;
288
+ }
289
+ export interface ReplaceStepPM extends BaseStepPM {
290
+ from: number;
291
+ to: number;
292
+ slice: SliceJson;
277
293
  structure?: boolean;
278
- };
294
+ }
295
+ export interface ReplaceAroundStepPM extends BaseStepPM {
296
+ from: number;
297
+ to: number;
298
+ gapFrom: number;
299
+ gapTo: number;
300
+ slice: SliceJson;
301
+ insert: number;
302
+ structure?: boolean;
303
+ }
304
+ export type InlineCommentStepPM = InlineCommentAddMarkStepPM | InlineCommentAddNodeMarkStepPM;
305
+ interface InlineCommentAddMarkStepPM extends BaseStepPM {
306
+ stepType: 'addMark';
307
+ from: number;
308
+ to: number;
309
+ mark?: {
310
+ type?: 'annotation';
311
+ attrs?: {
312
+ id?: string;
313
+ annotationType?: 'inlineComment';
314
+ };
315
+ };
316
+ }
317
+ export interface InlineCommentAddNodeMarkStepPM extends BaseStepPM {
318
+ stepType: 'addNodeMark';
319
+ pos: number;
320
+ mark?: {
321
+ type?: 'annotation';
322
+ attrs?: {
323
+ id?: string;
324
+ annotationType?: 'inlineComment';
325
+ };
326
+ };
327
+ }
328
+ export interface SetAttrsStepPM extends BaseStepPM {
329
+ stepType: 'setAttrs';
330
+ pos: number;
331
+ attrs: Record<string, unknown>;
332
+ }
333
+ export type BatchAttrsStepPM = BaseStepPM & BatchAttrsStep;
334
+ export type OverrideDocumentStepPM = BaseStepPM & OverrideDocumentStep;
335
+ export type StepJson = OverrideDocumentStepPM | ReplaceAroundStepPM | ReplaceStepPM | InlineCommentStepPM | SetAttrsStepPM;
279
336
  export interface CollabDataPayload extends CollabEventRemoteData {
280
337
  version: number;
281
338
  json: StepJson[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "99.1.1",
3
+ "version": "99.2.0",
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/"
@@ -113,7 +113,7 @@
113
113
  "dependencies": {
114
114
  "@atlaskit/activity-provider": "^2.5.0",
115
115
  "@atlaskit/adf-schema": "^46.1.0",
116
- "@atlaskit/adf-utils": "^19.16.0",
116
+ "@atlaskit/adf-utils": "^19.17.0",
117
117
  "@atlaskit/analytics-listeners": "^8.13.0",
118
118
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
119
119
  "@atlaskit/analytics-next": "^10.2.0",
@@ -129,7 +129,7 @@
129
129
  "@atlaskit/editor-shared-styles": "^3.2.0",
130
130
  "@atlaskit/editor-tables": "^2.8.0",
131
131
  "@atlaskit/emoji": "^67.12.0",
132
- "@atlaskit/icon": "^23.3.0",
132
+ "@atlaskit/icon": "^23.4.0",
133
133
  "@atlaskit/icon-object": "^6.9.0",
134
134
  "@atlaskit/link-datasource": "^3.15.0",
135
135
  "@atlaskit/link-picker": "^1.47.0",
@@ -141,7 +141,7 @@
141
141
  "@atlaskit/media-picker": "^67.0.0",
142
142
  "@atlaskit/media-ui": "^27.3.0",
143
143
  "@atlaskit/media-viewer": "49.6.1",
144
- "@atlaskit/mention": "^23.7.0",
144
+ "@atlaskit/mention": "^23.8.0",
145
145
  "@atlaskit/menu": "^2.13.0",
146
146
  "@atlaskit/onboarding": "^12.2.0",
147
147
  "@atlaskit/platform-feature-flags": "^0.3.0",
@@ -149,12 +149,12 @@
149
149
  "@atlaskit/primitives": "^13.3.0",
150
150
  "@atlaskit/profilecard": "^21.1.0",
151
151
  "@atlaskit/section-message": "^6.8.0",
152
- "@atlaskit/smart-card": "^34.1.0",
152
+ "@atlaskit/smart-card": "^34.2.0",
153
153
  "@atlaskit/smart-user-picker": "^6.11.0",
154
154
  "@atlaskit/spinner": "^16.3.0",
155
155
  "@atlaskit/task-decision": "^17.11.0",
156
156
  "@atlaskit/textfield": "^6.7.0",
157
- "@atlaskit/tmp-editor-statsig": "^2.33.0",
157
+ "@atlaskit/tmp-editor-statsig": "^2.35.0",
158
158
  "@atlaskit/tokens": "^3.0.0",
159
159
  "@atlaskit/tooltip": "^19.0.0",
160
160
  "@atlaskit/width-detector": "^4.3.0",