@atlaskit/editor-common 98.0.2 → 98.1.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 +17 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/code-block/index.js +1 -6
- package/dist/cjs/element-browser/components/ElementSearch.js +4 -5
- package/dist/cjs/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +13 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/performance-measures/index.js +7 -0
- package/dist/cjs/styles/shared/code-block.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/FloatingToolbar/styles.js +38 -2
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/code-block/index.js +1 -6
- package/dist/es2019/element-browser/components/ElementSearch.js +4 -5
- package/dist/es2019/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +12 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/performance-measures/index.js +6 -0
- package/dist/es2019/styles/shared/code-block.js +13 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/FloatingToolbar/styles.js +38 -2
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/code-block/index.js +1 -6
- package/dist/esm/element-browser/components/ElementSearch.js +4 -5
- package/dist/esm/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +13 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/performance-measures/index.js +6 -0
- package/dist/esm/styles/shared/code-block.js +2 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/FloatingToolbar/styles.js +38 -2
- package/dist/types/analytics/types/enums.d.ts +2 -1
- package/dist/types/analytics/types/general-events.d.ts +6 -1
- package/dist/types/code-block/index.d.ts +0 -1
- package/dist/types/hooks/usePluginStateEffect.d.ts +1 -2
- package/dist/types/performance-measures/index.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +6 -1
- package/dist/types-ts4.5/code-block/index.d.ts +0 -1
- package/dist/types-ts4.5/hooks/usePluginStateEffect.d.ts +1 -2
- package/dist/types-ts4.5/performance-measures/index.d.ts +1 -0
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 98.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#99709](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99709)
|
|
8
|
+
[`f920f8775ebe9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f920f8775ebe9) -
|
|
9
|
+
[ux] [https://product-fabric.atlassian.net/browse/EDF-396](EDF-396) - fix a list item with code
|
|
10
|
+
block marker vertical alignment
|
|
11
|
+
|
|
12
|
+
## 98.0.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#98963](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98963)
|
|
17
|
+
[`3638dcf79b6c7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3638dcf79b6c7) -
|
|
18
|
+
ED-26126 Cleanup code wrapping language bug fg
|
|
19
|
+
|
|
3
20
|
## 98.0.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -154,6 +154,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
154
154
|
ACTION["UPLOAD_FAILED"] = "uploadFailed";
|
|
155
155
|
ACTION["TOGGLE_CODE_BLOCK_WRAP"] = "toggleCodeBlockWrap";
|
|
156
156
|
ACTION["RESIZED"] = "resized";
|
|
157
|
+
ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
|
|
157
158
|
return ACTION;
|
|
158
159
|
}({});
|
|
159
160
|
var INPUT_METHOD = exports.INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.updateCodeBlockWrappedStateNodeKeys = exports.transferCodeBlockWrappedValue = exports.isCodeBlockWordWrapEnabled = exports.defaultWordWrapState = exports.codeBlockWrappedStates = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
/* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
9
8
|
|
|
10
9
|
var defaultWordWrapState = exports.defaultWordWrapState = false;
|
|
@@ -16,7 +15,6 @@ var isCodeBlockWordWrapEnabled = exports.isCodeBlockWordWrapEnabled = function i
|
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Swap the old node key with the new node key in the wrapped states WeakMap.
|
|
19
|
-
* Replaced with updateCodeBlockWrappedStateNodeKeys() under 'editor_code_block_wrapping_language_change_bug' feature gate.
|
|
20
18
|
*/
|
|
21
19
|
var transferCodeBlockWrappedValue = exports.transferCodeBlockWrappedValue = function transferCodeBlockWrappedValue(oldCodeBlockNode, newCodeBlockNode) {
|
|
22
20
|
// Don't overwrite the value for the new node if it already exists.
|
|
@@ -35,9 +33,6 @@ var transferCodeBlockWrappedValue = exports.transferCodeBlockWrappedValue = func
|
|
|
35
33
|
* This function takes all the given nodes, finds their old nodes from the old state and updates these old node keys.
|
|
36
34
|
*/
|
|
37
35
|
var updateCodeBlockWrappedStateNodeKeys = exports.updateCodeBlockWrappedStateNodeKeys = function updateCodeBlockWrappedStateNodeKeys(newCodeBlockNodes, oldState) {
|
|
38
|
-
if (!(0, _platformFeatureFlags.fg)('editor_code_block_wrapping_language_change_bug')) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
36
|
newCodeBlockNodes.forEach(function (newCodeBlockNode) {
|
|
42
37
|
// Don't overwrite the value for the new node if it already exists.
|
|
43
38
|
// This can happen when a drag&drop is swapping nodes.
|
|
@@ -46,7 +41,7 @@ var updateCodeBlockWrappedStateNodeKeys = exports.updateCodeBlockWrappedStateNod
|
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
// Do not go out of range on the oldState doc. Happens on initial load.
|
|
49
|
-
if (oldState.doc.
|
|
44
|
+
if (oldState.doc.content.size <= newCodeBlockNode.pos) {
|
|
50
45
|
return;
|
|
51
46
|
}
|
|
52
47
|
var oldCodeBlockNode = oldState.doc.nodeAt(newCodeBlockNode.pos);
|
|
@@ -13,7 +13,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
13
13
|
var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsContext"));
|
|
14
14
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
15
|
var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
16
|
-
var _search = _interopRequireDefault(require("@atlaskit/icon/
|
|
16
|
+
var _search = _interopRequireDefault(require("@atlaskit/icon/core/migration/search"));
|
|
17
17
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
18
18
|
var _constants = require("../constants");
|
|
19
19
|
var _useFocus = _interopRequireDefault(require("../hooks/use-focus"));
|
|
@@ -103,9 +103,9 @@ function ElementSearch(_ref) {
|
|
|
103
103
|
"data-testid": "element_search__element_before_input",
|
|
104
104
|
"aria-hidden": "true"
|
|
105
105
|
}, (0, _react2.jsx)(_search.default, {
|
|
106
|
-
|
|
106
|
+
spacing: "spacious",
|
|
107
107
|
label: "Advanced search",
|
|
108
|
-
|
|
108
|
+
color: "var(--ds-icon-subtle, #626F86)"
|
|
109
109
|
})),
|
|
110
110
|
elemAfterInput: (0, _react2.jsx)("div", {
|
|
111
111
|
css: elementAfterInput,
|
|
@@ -166,8 +166,7 @@ var wrapperInline = (0, _react2.css)({
|
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
168
|
var elementBeforeInput = (0, _react2.css)({
|
|
169
|
-
margin: "
|
|
170
|
-
color: "var(--ds-icon, #44546F)",
|
|
169
|
+
margin: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)", " 0 ", "var(--ds-space-100, 8px)"),
|
|
171
170
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
172
171
|
'span, svg': {
|
|
173
172
|
height: '20px',
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.useSharedPluginStateSelector = useSharedPluginStateSelector;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
10
|
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
|
|
10
11
|
var _react = require("react");
|
|
@@ -99,10 +100,19 @@ function useSharedPluginStateSelector(api, plugin) {
|
|
|
99
100
|
pluginName = _plugin$split4[0];
|
|
100
101
|
return [pluginName];
|
|
101
102
|
}, [plugin]);
|
|
102
|
-
|
|
103
|
+
var initialState = (0, _react.useMemo)(function () {
|
|
104
|
+
var _api$pluginName;
|
|
105
|
+
var _plugin$split5 = plugin.split('.'),
|
|
106
|
+
_plugin$split6 = (0, _slicedToArray2.default)(_plugin$split5, 1),
|
|
107
|
+
pluginName = _plugin$split6[0];
|
|
108
|
+
return transformer((0, _defineProperty2.default)({}, "".concat(pluginName, "State"), api === null || api === void 0 || (_api$pluginName = api[pluginName]) === null || _api$pluginName === void 0 ? void 0 : _api$pluginName.sharedState.currentState()));
|
|
109
|
+
}, [plugin, api, transformer]);
|
|
110
|
+
return useSharedPluginStateSelectorInternal(api, pluginNameArray, transformer, initialState);
|
|
103
111
|
}
|
|
104
|
-
|
|
105
|
-
|
|
112
|
+
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
114
|
+
function useSharedPluginStateSelectorInternal(api, plugins, transformer, initialState) {
|
|
115
|
+
var _useState = (0, _react.useState)(initialState),
|
|
106
116
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
107
117
|
selectedPluginState = _useState2[0],
|
|
108
118
|
setSelectedPluginState = _useState2[1];
|
|
@@ -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 = "98.0
|
|
20
|
+
var packageVersion = "98.1.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
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.clearMeasure = clearMeasure;
|
|
7
|
+
exports.isMeasuring = isMeasuring;
|
|
7
8
|
exports.startMeasure = startMeasure;
|
|
8
9
|
exports.stopMeasure = stopMeasure;
|
|
9
10
|
var _isPerformanceApiAvailable = require("../utils/performance/is-performance-api-available");
|
|
@@ -43,4 +44,10 @@ function clearMeasure(measureName) {
|
|
|
43
44
|
performance.clearMarks("".concat(measureName, "::start"));
|
|
44
45
|
performance.clearMarks("".concat(measureName, "::end"));
|
|
45
46
|
performance.clearMeasures(measureName);
|
|
47
|
+
}
|
|
48
|
+
function isMeasuring(measureName) {
|
|
49
|
+
if (!(0, _isPerformanceApiAvailable.isPerformanceAPIAvailable)()) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
return measureMap.get(measureName) !== undefined;
|
|
46
53
|
}
|
|
@@ -23,9 +23,9 @@ var CodeBlockSharedCssClassName = exports.CodeBlockSharedCssClassName = {
|
|
|
23
23
|
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped'
|
|
24
24
|
};
|
|
25
25
|
var codeBlockSharedStyles = exports.codeBlockSharedStyles = function codeBlockSharedStyles() {
|
|
26
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\t\tclear: both;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tposition: relative;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tpadding:
|
|
26
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\t\tclear: both;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tposition: relative;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tpadding: ", ";\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: ", ";\n\t\t\tbox-sizing: content-box;\n\t\t}\n\n\t\t// This is a fix of marker of list item with code block.\n\t\t// The list item marker in Chrome is aligned by the baseline of the text,\n\t\t// that's why we need to add a text (content: \"1\") to the line number gutter to align\n\t\t// the list item marker with the text.\n\t\t// Without it, the list item marker will be aligned by the bottom of the code block.\n\t\t.", "::before {\n\t\t\tcontent: \"1\";\n\t\t\tvisibility: hidden;\n\t\t\tfont-size: ", ";\n\t\t\tline-height: 1.5rem;\n\t\t}\n\n\t\t.", " {\n\t\t\tcode {\n\t\t\t\ttab-size: 4;\n\t\t\t\tcursor: text;\n\t\t\t\tcolor: ", ";\n\t\t\t\tborder-radius: ", ";\n\t\t\t\tmargin: ", ";\n\t\t\t\tfont-size: ", ";\n\t\t\t\tline-height: 1.5rem;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tpointer-events: none;\n\t\t\tuser-select: none;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\tfont-size: ", ";\n\t\t\tpadding: 0px ", ";\n\t\t\tline-height: 1.5rem;\n\t\t\ttext-align: right;\n\t\t\tcolor: ", ";\n\t\t\tbox-sizing: content-box;\n\t\t}\n\t}\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, #FFFFFF)", "var(--ds-border-radius, 3px)", _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorCodeFontFamily, _editorSharedStyles.akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, "var(--ds-background-neutral, #091E420F)", "var(--ds-border-radius, 3px)", (0, _editorSharedStyles.overflowShadow)({
|
|
27
27
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
28
|
-
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, #091E420F)", "var(--ds-space-100, 8px)", (0, _editorSharedStyles.relativeFontSizeToBase16)(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, #172B4D)", "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", (0, _editorSharedStyles.relativeFontSizeToBase16)(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, #505F79)");
|
|
28
|
+
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, #091E420F)", "var(--ds-space-100, 8px)", (0, _editorSharedStyles.relativeFontSizeToBase16)(14), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, #172B4D)", "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", (0, _editorSharedStyles.relativeFontSizeToBase16)(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, #505F79)");
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -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 = "98.0
|
|
26
|
+
var packageVersion = "98.1.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.iconOnlySpacing = exports.getButtonStyles = void 0;
|
|
7
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
7
8
|
var iconOnlySpacing = exports.iconOnlySpacing = {
|
|
8
9
|
'&&': {
|
|
9
10
|
padding: '0px'
|
|
@@ -40,6 +41,22 @@ var background = {
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
};
|
|
44
|
+
var backgroundVisualRefresh = {
|
|
45
|
+
danger: {
|
|
46
|
+
default: {
|
|
47
|
+
light: 'inherit',
|
|
48
|
+
dark: 'inherit'
|
|
49
|
+
},
|
|
50
|
+
hover: {
|
|
51
|
+
light: "var(--ds-background-danger-hovered, #FFD5D2)",
|
|
52
|
+
dark: "var(--ds-background-danger-hovered, #FFD5D2)"
|
|
53
|
+
},
|
|
54
|
+
active: {
|
|
55
|
+
light: "var(--ds-background-danger-pressed, #FD9891)",
|
|
56
|
+
dark: "var(--ds-background-danger-pressed, #FD9891)"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
43
60
|
var color = {
|
|
44
61
|
danger: {
|
|
45
62
|
default: {
|
|
@@ -56,12 +73,31 @@ var color = {
|
|
|
56
73
|
}
|
|
57
74
|
}
|
|
58
75
|
};
|
|
76
|
+
var colorVisualRefresh = {
|
|
77
|
+
danger: {
|
|
78
|
+
default: {
|
|
79
|
+
light: "var(--ds-icon-subtle, #626F86)",
|
|
80
|
+
dark: "var(--ds-icon-subtle, #626F86)"
|
|
81
|
+
},
|
|
82
|
+
hover: {
|
|
83
|
+
light: "var(--ds-icon-danger, #C9372C)",
|
|
84
|
+
dark: "var(--ds-icon-danger, #C9372C)"
|
|
85
|
+
},
|
|
86
|
+
active: {
|
|
87
|
+
light: "var(--ds-icon-danger, #C9372C)",
|
|
88
|
+
dark: "var(--ds-icon-danger, #C9372C)"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
59
92
|
|
|
60
93
|
// Ignored via go/ees005
|
|
61
94
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
95
|
var getButtonStyles = exports.getButtonStyles = function getButtonStyles(props) {
|
|
63
96
|
return {
|
|
64
|
-
background: getStyles(
|
|
65
|
-
|
|
97
|
+
background: getStyles(
|
|
98
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
99
|
+
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? backgroundVisualRefresh : background, props),
|
|
100
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
101
|
+
color: getStyles((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? colorVisualRefresh : color, props)
|
|
66
102
|
};
|
|
67
103
|
};
|
|
@@ -148,6 +148,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
148
148
|
ACTION["UPLOAD_FAILED"] = "uploadFailed";
|
|
149
149
|
ACTION["TOGGLE_CODE_BLOCK_WRAP"] = "toggleCodeBlockWrap";
|
|
150
150
|
ACTION["RESIZED"] = "resized";
|
|
151
|
+
ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
|
|
151
152
|
return ACTION;
|
|
152
153
|
}({});
|
|
153
154
|
export let INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
2
2
|
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
export const defaultWordWrapState = false;
|
|
5
4
|
export const codeBlockWrappedStates = new WeakMap();
|
|
6
5
|
export const isCodeBlockWordWrapEnabled = codeBlockNode => {
|
|
@@ -10,7 +9,6 @@ export const isCodeBlockWordWrapEnabled = codeBlockNode => {
|
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Swap the old node key with the new node key in the wrapped states WeakMap.
|
|
13
|
-
* Replaced with updateCodeBlockWrappedStateNodeKeys() under 'editor_code_block_wrapping_language_change_bug' feature gate.
|
|
14
12
|
*/
|
|
15
13
|
export const transferCodeBlockWrappedValue = (oldCodeBlockNode, newCodeBlockNode) => {
|
|
16
14
|
// Don't overwrite the value for the new node if it already exists.
|
|
@@ -29,9 +27,6 @@ export const transferCodeBlockWrappedValue = (oldCodeBlockNode, newCodeBlockNode
|
|
|
29
27
|
* This function takes all the given nodes, finds their old nodes from the old state and updates these old node keys.
|
|
30
28
|
*/
|
|
31
29
|
export const updateCodeBlockWrappedStateNodeKeys = (newCodeBlockNodes, oldState) => {
|
|
32
|
-
if (!fg('editor_code_block_wrapping_language_change_bug')) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
30
|
newCodeBlockNodes.forEach(newCodeBlockNode => {
|
|
36
31
|
// Don't overwrite the value for the new node if it already exists.
|
|
37
32
|
// This can happen when a drag&drop is swapping nodes.
|
|
@@ -40,7 +35,7 @@ export const updateCodeBlockWrappedStateNodeKeys = (newCodeBlockNodes, oldState)
|
|
|
40
35
|
}
|
|
41
36
|
|
|
42
37
|
// Do not go out of range on the oldState doc. Happens on initial load.
|
|
43
|
-
if (oldState.doc.
|
|
38
|
+
if (oldState.doc.content.size <= newCodeBlockNode.pos) {
|
|
44
39
|
return;
|
|
45
40
|
}
|
|
46
41
|
const oldCodeBlockNode = oldState.doc.nodeAt(newCodeBlockNode.pos);
|
|
@@ -10,7 +10,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
10
10
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
11
11
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
12
12
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
13
|
-
import SearchIcon from '@atlaskit/icon/
|
|
13
|
+
import SearchIcon from '@atlaskit/icon/core/migration/search';
|
|
14
14
|
import Textfield from '@atlaskit/textfield';
|
|
15
15
|
import { GRID_SIZE, SEARCH_ITEM_HEIGHT_WIDTH } from '../constants';
|
|
16
16
|
import useFocus from '../hooks/use-focus';
|
|
@@ -94,9 +94,9 @@ function ElementSearch({
|
|
|
94
94
|
"data-testid": "element_search__element_before_input",
|
|
95
95
|
"aria-hidden": "true"
|
|
96
96
|
}, jsx(SearchIcon, {
|
|
97
|
-
|
|
97
|
+
spacing: "spacious",
|
|
98
98
|
label: "Advanced search",
|
|
99
|
-
|
|
99
|
+
color: "var(--ds-icon-subtle, #626F86)"
|
|
100
100
|
})),
|
|
101
101
|
elemAfterInput: jsx("div", {
|
|
102
102
|
css: elementAfterInput,
|
|
@@ -157,8 +157,7 @@ const wrapperInline = css({
|
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
const elementBeforeInput = css({
|
|
160
|
-
margin:
|
|
161
|
-
color: "var(--ds-icon, #44546F)",
|
|
160
|
+
margin: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-075, 6px)"} 0 ${"var(--ds-space-100, 8px)"}`,
|
|
162
161
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
163
162
|
'span, svg': {
|
|
164
163
|
height: '20px',
|
|
@@ -86,10 +86,19 @@ export function useSharedPluginStateSelector(api, plugin) {
|
|
|
86
86
|
const [pluginName] = plugin.split('.');
|
|
87
87
|
return [pluginName];
|
|
88
88
|
}, [plugin]);
|
|
89
|
-
|
|
89
|
+
const initialState = useMemo(() => {
|
|
90
|
+
var _api$pluginName;
|
|
91
|
+
const [pluginName] = plugin.split('.');
|
|
92
|
+
return transformer({
|
|
93
|
+
[`${pluginName}State`]: api === null || api === void 0 ? void 0 : (_api$pluginName = api[pluginName]) === null || _api$pluginName === void 0 ? void 0 : _api$pluginName.sharedState.currentState()
|
|
94
|
+
});
|
|
95
|
+
}, [plugin, api, transformer]);
|
|
96
|
+
return useSharedPluginStateSelectorInternal(api, pluginNameArray, transformer, initialState);
|
|
90
97
|
}
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
100
|
+
function useSharedPluginStateSelectorInternal(api, plugins, transformer, initialState) {
|
|
101
|
+
const [selectedPluginState, setSelectedPluginState] = useState(initialState);
|
|
93
102
|
usePluginStateEffect(api, plugins, pluginStates => {
|
|
94
103
|
// `pluginStates`: This is the same type through inference - but typescript doesn't recognise them as they are computed slightly differently
|
|
95
104
|
const transformedValue = transformer(pluginStates);
|
|
@@ -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 = "98.0
|
|
4
|
+
const packageVersion = "98.1.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
|
|
@@ -35,4 +35,10 @@ export function clearMeasure(measureName) {
|
|
|
35
35
|
performance.clearMarks(`${measureName}::start`);
|
|
36
36
|
performance.clearMarks(`${measureName}::end`);
|
|
37
37
|
performance.clearMeasures(measureName);
|
|
38
|
+
}
|
|
39
|
+
export function isMeasuring(measureName) {
|
|
40
|
+
if (!isPerformanceAPIAvailable()) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return measureMap.get(measureName) !== undefined;
|
|
38
44
|
}
|
|
@@ -111,12 +111,24 @@ export const codeBlockSharedStyles = () => css`
|
|
|
111
111
|
background-color: ${"var(--ds-background-neutral, #091E420F)"};
|
|
112
112
|
position: relative;
|
|
113
113
|
width: var(--lineNumberGutterWidth, 2rem);
|
|
114
|
-
padding:
|
|
114
|
+
padding: ${"var(--ds-space-100, 8px)"};
|
|
115
115
|
flex-shrink: 0;
|
|
116
116
|
font-size: ${relativeFontSizeToBase16(14)};
|
|
117
117
|
box-sizing: content-box;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
// This is a fix of marker of list item with code block.
|
|
121
|
+
// The list item marker in Chrome is aligned by the baseline of the text,
|
|
122
|
+
// that's why we need to add a text (content: "1") to the line number gutter to align
|
|
123
|
+
// the list item marker with the text.
|
|
124
|
+
// Without it, the list item marker will be aligned by the bottom of the code block.
|
|
125
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER}::before {
|
|
126
|
+
content: "1";
|
|
127
|
+
visibility: hidden;
|
|
128
|
+
font-size: ${relativeFontSizeToBase16(14)};
|
|
129
|
+
line-height: 1.5rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
120
132
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
|
|
121
133
|
code {
|
|
122
134
|
tab-size: 4;
|
|
@@ -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 = "98.0
|
|
16
|
+
const packageVersion = "98.1.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
export const iconOnlySpacing = {
|
|
2
3
|
'&&': {
|
|
3
4
|
padding: '0px'
|
|
@@ -32,6 +33,22 @@ const background = {
|
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
};
|
|
36
|
+
const backgroundVisualRefresh = {
|
|
37
|
+
danger: {
|
|
38
|
+
default: {
|
|
39
|
+
light: 'inherit',
|
|
40
|
+
dark: 'inherit'
|
|
41
|
+
},
|
|
42
|
+
hover: {
|
|
43
|
+
light: "var(--ds-background-danger-hovered, #FFD5D2)",
|
|
44
|
+
dark: "var(--ds-background-danger-hovered, #FFD5D2)"
|
|
45
|
+
},
|
|
46
|
+
active: {
|
|
47
|
+
light: "var(--ds-background-danger-pressed, #FD9891)",
|
|
48
|
+
dark: "var(--ds-background-danger-pressed, #FD9891)"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
35
52
|
const color = {
|
|
36
53
|
danger: {
|
|
37
54
|
default: {
|
|
@@ -48,10 +65,29 @@ const color = {
|
|
|
48
65
|
}
|
|
49
66
|
}
|
|
50
67
|
};
|
|
68
|
+
const colorVisualRefresh = {
|
|
69
|
+
danger: {
|
|
70
|
+
default: {
|
|
71
|
+
light: "var(--ds-icon-subtle, #626F86)",
|
|
72
|
+
dark: "var(--ds-icon-subtle, #626F86)"
|
|
73
|
+
},
|
|
74
|
+
hover: {
|
|
75
|
+
light: "var(--ds-icon-danger, #C9372C)",
|
|
76
|
+
dark: "var(--ds-icon-danger, #C9372C)"
|
|
77
|
+
},
|
|
78
|
+
active: {
|
|
79
|
+
light: "var(--ds-icon-danger, #C9372C)",
|
|
80
|
+
dark: "var(--ds-icon-danger, #C9372C)"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
51
84
|
|
|
52
85
|
// Ignored via go/ees005
|
|
53
86
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
87
|
export const getButtonStyles = props => ({
|
|
55
|
-
background: getStyles(
|
|
56
|
-
|
|
88
|
+
background: getStyles(
|
|
89
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
90
|
+
fg('platform-visual-refresh-icons') ? backgroundVisualRefresh : background, props),
|
|
91
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
92
|
+
color: getStyles(fg('platform-visual-refresh-icons') ? colorVisualRefresh : color, props)
|
|
57
93
|
});
|
|
@@ -148,6 +148,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
148
148
|
ACTION["UPLOAD_FAILED"] = "uploadFailed";
|
|
149
149
|
ACTION["TOGGLE_CODE_BLOCK_WRAP"] = "toggleCodeBlockWrap";
|
|
150
150
|
ACTION["RESIZED"] = "resized";
|
|
151
|
+
ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
|
|
151
152
|
return ACTION;
|
|
152
153
|
}({});
|
|
153
154
|
export var INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
2
2
|
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
export var defaultWordWrapState = false;
|
|
5
4
|
export var codeBlockWrappedStates = new WeakMap();
|
|
6
5
|
export var isCodeBlockWordWrapEnabled = function isCodeBlockWordWrapEnabled(codeBlockNode) {
|
|
@@ -10,7 +9,6 @@ export var isCodeBlockWordWrapEnabled = function isCodeBlockWordWrapEnabled(code
|
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Swap the old node key with the new node key in the wrapped states WeakMap.
|
|
13
|
-
* Replaced with updateCodeBlockWrappedStateNodeKeys() under 'editor_code_block_wrapping_language_change_bug' feature gate.
|
|
14
12
|
*/
|
|
15
13
|
export var transferCodeBlockWrappedValue = function transferCodeBlockWrappedValue(oldCodeBlockNode, newCodeBlockNode) {
|
|
16
14
|
// Don't overwrite the value for the new node if it already exists.
|
|
@@ -29,9 +27,6 @@ export var transferCodeBlockWrappedValue = function transferCodeBlockWrappedValu
|
|
|
29
27
|
* This function takes all the given nodes, finds their old nodes from the old state and updates these old node keys.
|
|
30
28
|
*/
|
|
31
29
|
export var updateCodeBlockWrappedStateNodeKeys = function updateCodeBlockWrappedStateNodeKeys(newCodeBlockNodes, oldState) {
|
|
32
|
-
if (!fg('editor_code_block_wrapping_language_change_bug')) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
30
|
newCodeBlockNodes.forEach(function (newCodeBlockNode) {
|
|
36
31
|
// Don't overwrite the value for the new node if it already exists.
|
|
37
32
|
// This can happen when a drag&drop is swapping nodes.
|
|
@@ -40,7 +35,7 @@ export var updateCodeBlockWrappedStateNodeKeys = function updateCodeBlockWrapped
|
|
|
40
35
|
}
|
|
41
36
|
|
|
42
37
|
// Do not go out of range on the oldState doc. Happens on initial load.
|
|
43
|
-
if (oldState.doc.
|
|
38
|
+
if (oldState.doc.content.size <= newCodeBlockNode.pos) {
|
|
44
39
|
return;
|
|
45
40
|
}
|
|
46
41
|
var oldCodeBlockNode = oldState.doc.nodeAt(newCodeBlockNode.pos);
|
|
@@ -11,7 +11,7 @@ import { injectIntl } from 'react-intl-next';
|
|
|
11
11
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
12
12
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
13
13
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
14
|
-
import SearchIcon from '@atlaskit/icon/
|
|
14
|
+
import SearchIcon from '@atlaskit/icon/core/migration/search';
|
|
15
15
|
import Textfield from '@atlaskit/textfield';
|
|
16
16
|
import { GRID_SIZE, SEARCH_ITEM_HEIGHT_WIDTH } from '../constants';
|
|
17
17
|
import useFocus from '../hooks/use-focus';
|
|
@@ -92,9 +92,9 @@ function ElementSearch(_ref) {
|
|
|
92
92
|
"data-testid": "element_search__element_before_input",
|
|
93
93
|
"aria-hidden": "true"
|
|
94
94
|
}, jsx(SearchIcon, {
|
|
95
|
-
|
|
95
|
+
spacing: "spacious",
|
|
96
96
|
label: "Advanced search",
|
|
97
|
-
|
|
97
|
+
color: "var(--ds-icon-subtle, #626F86)"
|
|
98
98
|
})),
|
|
99
99
|
elemAfterInput: jsx("div", {
|
|
100
100
|
css: elementAfterInput,
|
|
@@ -155,8 +155,7 @@ var wrapperInline = css({
|
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
var elementBeforeInput = css({
|
|
158
|
-
margin: "
|
|
159
|
-
color: "var(--ds-icon, #44546F)",
|
|
158
|
+
margin: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)", " 0 ", "var(--ds-space-100, 8px)"),
|
|
160
159
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
161
160
|
'span, svg': {
|
|
162
161
|
height: '20px',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import _toArray from "@babel/runtime/helpers/toArray";
|
|
3
4
|
import { useState, useCallback, useMemo } from 'react';
|
|
@@ -93,10 +94,19 @@ export function useSharedPluginStateSelector(api, plugin) {
|
|
|
93
94
|
pluginName = _plugin$split4[0];
|
|
94
95
|
return [pluginName];
|
|
95
96
|
}, [plugin]);
|
|
96
|
-
|
|
97
|
+
var initialState = useMemo(function () {
|
|
98
|
+
var _api$pluginName;
|
|
99
|
+
var _plugin$split5 = plugin.split('.'),
|
|
100
|
+
_plugin$split6 = _slicedToArray(_plugin$split5, 1),
|
|
101
|
+
pluginName = _plugin$split6[0];
|
|
102
|
+
return transformer(_defineProperty({}, "".concat(pluginName, "State"), api === null || api === void 0 || (_api$pluginName = api[pluginName]) === null || _api$pluginName === void 0 ? void 0 : _api$pluginName.sharedState.currentState()));
|
|
103
|
+
}, [plugin, api, transformer]);
|
|
104
|
+
return useSharedPluginStateSelectorInternal(api, pluginNameArray, transformer, initialState);
|
|
97
105
|
}
|
|
98
|
-
|
|
99
|
-
|
|
106
|
+
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
108
|
+
function useSharedPluginStateSelectorInternal(api, plugins, transformer, initialState) {
|
|
109
|
+
var _useState = useState(initialState),
|
|
100
110
|
_useState2 = _slicedToArray(_useState, 2),
|
|
101
111
|
selectedPluginState = _useState2[0],
|
|
102
112
|
setSelectedPluginState = _useState2[1];
|
|
@@ -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 = "98.0
|
|
10
|
+
var packageVersion = "98.1.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
|
|
@@ -35,4 +35,10 @@ export function clearMeasure(measureName) {
|
|
|
35
35
|
performance.clearMarks("".concat(measureName, "::start"));
|
|
36
36
|
performance.clearMarks("".concat(measureName, "::end"));
|
|
37
37
|
performance.clearMeasures(measureName);
|
|
38
|
+
}
|
|
39
|
+
export function isMeasuring(measureName) {
|
|
40
|
+
if (!isPerformanceAPIAvailable()) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return measureMap.get(measureName) !== undefined;
|
|
38
44
|
}
|
|
@@ -16,9 +16,9 @@ export var CodeBlockSharedCssClassName = {
|
|
|
16
16
|
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped'
|
|
17
17
|
};
|
|
18
18
|
export var codeBlockSharedStyles = function codeBlockSharedStyles() {
|
|
19
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\t\tclear: both;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tposition: relative;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tpadding:
|
|
19
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\t\tclear: both;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tposition: relative;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tpadding: ", ";\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: ", ";\n\t\t\tbox-sizing: content-box;\n\t\t}\n\n\t\t// This is a fix of marker of list item with code block.\n\t\t// The list item marker in Chrome is aligned by the baseline of the text,\n\t\t// that's why we need to add a text (content: \"1\") to the line number gutter to align\n\t\t// the list item marker with the text.\n\t\t// Without it, the list item marker will be aligned by the bottom of the code block.\n\t\t.", "::before {\n\t\t\tcontent: \"1\";\n\t\t\tvisibility: hidden;\n\t\t\tfont-size: ", ";\n\t\t\tline-height: 1.5rem;\n\t\t}\n\n\t\t.", " {\n\t\t\tcode {\n\t\t\t\ttab-size: 4;\n\t\t\t\tcursor: text;\n\t\t\t\tcolor: ", ";\n\t\t\t\tborder-radius: ", ";\n\t\t\t\tmargin: ", ";\n\t\t\t\tfont-size: ", ";\n\t\t\t\tline-height: 1.5rem;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tpointer-events: none;\n\t\t\tuser-select: none;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\tfont-size: ", ";\n\t\t\tpadding: 0px ", ";\n\t\t\tline-height: 1.5rem;\n\t\t\ttext-align: right;\n\t\t\tcolor: ", ";\n\t\t\tbox-sizing: content-box;\n\t\t}\n\t}\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, #FFFFFF)", "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, akEditorCodeFontFamily, akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, "var(--ds-background-neutral, #091E420F)", "var(--ds-border-radius, 3px)", overflowShadow({
|
|
20
20
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
21
|
-
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, #091E420F)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, #172B4D)", "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET, relativeFontSizeToBase16(14), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, #505F79)");
|
|
21
|
+
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, #091E420F)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(14), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, relativeFontSizeToBase16(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, #172B4D)", "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET, relativeFontSizeToBase16(14), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, #505F79)");
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -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 = "98.0
|
|
23
|
+
var packageVersion = "98.1.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
export var iconOnlySpacing = {
|
|
2
3
|
'&&': {
|
|
3
4
|
padding: '0px'
|
|
@@ -34,6 +35,22 @@ var background = {
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
};
|
|
38
|
+
var backgroundVisualRefresh = {
|
|
39
|
+
danger: {
|
|
40
|
+
default: {
|
|
41
|
+
light: 'inherit',
|
|
42
|
+
dark: 'inherit'
|
|
43
|
+
},
|
|
44
|
+
hover: {
|
|
45
|
+
light: "var(--ds-background-danger-hovered, #FFD5D2)",
|
|
46
|
+
dark: "var(--ds-background-danger-hovered, #FFD5D2)"
|
|
47
|
+
},
|
|
48
|
+
active: {
|
|
49
|
+
light: "var(--ds-background-danger-pressed, #FD9891)",
|
|
50
|
+
dark: "var(--ds-background-danger-pressed, #FD9891)"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
37
54
|
var color = {
|
|
38
55
|
danger: {
|
|
39
56
|
default: {
|
|
@@ -50,12 +67,31 @@ var color = {
|
|
|
50
67
|
}
|
|
51
68
|
}
|
|
52
69
|
};
|
|
70
|
+
var colorVisualRefresh = {
|
|
71
|
+
danger: {
|
|
72
|
+
default: {
|
|
73
|
+
light: "var(--ds-icon-subtle, #626F86)",
|
|
74
|
+
dark: "var(--ds-icon-subtle, #626F86)"
|
|
75
|
+
},
|
|
76
|
+
hover: {
|
|
77
|
+
light: "var(--ds-icon-danger, #C9372C)",
|
|
78
|
+
dark: "var(--ds-icon-danger, #C9372C)"
|
|
79
|
+
},
|
|
80
|
+
active: {
|
|
81
|
+
light: "var(--ds-icon-danger, #C9372C)",
|
|
82
|
+
dark: "var(--ds-icon-danger, #C9372C)"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
53
86
|
|
|
54
87
|
// Ignored via go/ees005
|
|
55
88
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
89
|
export var getButtonStyles = function getButtonStyles(props) {
|
|
57
90
|
return {
|
|
58
|
-
background: getStyles(
|
|
59
|
-
|
|
91
|
+
background: getStyles(
|
|
92
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
93
|
+
fg('platform-visual-refresh-icons') ? backgroundVisualRefresh : background, props),
|
|
94
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
95
|
+
color: getStyles(fg('platform-visual-refresh-icons') ? colorVisualRefresh : color, props)
|
|
60
96
|
};
|
|
61
97
|
};
|
|
@@ -154,7 +154,8 @@ export declare enum ACTION {
|
|
|
154
154
|
UPLOAD_SUCCEEDED = "uploadSucceeded",
|
|
155
155
|
UPLOAD_FAILED = "uploadFailed",
|
|
156
156
|
TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap",
|
|
157
|
-
RESIZED = "resized"
|
|
157
|
+
RESIZED = "resized",
|
|
158
|
+
BLOCKS_DRAG_INIT = "blocksDragInit"
|
|
158
159
|
}
|
|
159
160
|
export declare enum INPUT_METHOD {
|
|
160
161
|
ASCII = "ascii",
|
|
@@ -183,6 +183,11 @@ type InvalidMediaContentTransformedAEP = OperationalAEP<ACTION.INVALID_MEDIA_CON
|
|
|
183
183
|
type CollabStepsTrackerPayloadAEP = OperationalAEP<ACTION.STEPS_TRACKED | ACTION.STEPS_FILTERED, ACTION_SUBJECT.COLLAB, undefined, {
|
|
184
184
|
steps: unknown[];
|
|
185
185
|
}>;
|
|
186
|
+
type BlocksDragInitAEP = OperationalAEP<ACTION.BLOCKS_DRAG_INIT, ACTION_SUBJECT.EDITOR, undefined, {
|
|
187
|
+
duration: number;
|
|
188
|
+
startTime: number;
|
|
189
|
+
nodesCount: number;
|
|
190
|
+
}>;
|
|
186
191
|
type HeadingAnchorLinkButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.HEADING_ANCHOR_LINK, undefined>;
|
|
187
192
|
type CodeBlockWordWrapToggleAEP = TrackAEP<ACTION.TOGGLE_CODE_BLOCK_WRAP, ACTION_SUBJECT.CODE_BLOCK, undefined, {
|
|
188
193
|
platform: PLATFORMS;
|
|
@@ -200,5 +205,5 @@ type CopyLinkToAnchorButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.COPY_LINK_TO_ANCHOR
|
|
|
200
205
|
extensionType?: string;
|
|
201
206
|
isLivePage?: boolean;
|
|
202
207
|
}>;
|
|
203
|
-
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | CopyLinkToAnchorButtonAEP;
|
|
208
|
+
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | CopyLinkToAnchorButtonAEP;
|
|
204
209
|
export {};
|
|
@@ -6,7 +6,6 @@ export declare const codeBlockWrappedStates: WeakMap<PmNode, boolean | undefined
|
|
|
6
6
|
export declare const isCodeBlockWordWrapEnabled: (codeBlockNode: PmNode) => boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Swap the old node key with the new node key in the wrapped states WeakMap.
|
|
9
|
-
* Replaced with updateCodeBlockWrappedStateNodeKeys() under 'editor_code_block_wrapping_language_change_bug' feature gate.
|
|
10
9
|
*/
|
|
11
10
|
export declare const transferCodeBlockWrappedValue: (oldCodeBlockNode: PmNode, newCodeBlockNode: PmNode) => void;
|
|
12
11
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BasePluginDependenciesAPI, EditorInjectionAPI, ExtractInjectionAPI, NextEditorPlugin } from '../types/next-editor-plugin';
|
|
2
2
|
type NamedPluginStatesFromInjectionAPI<API extends ExtractInjectionAPI<NextEditorPlugin<any, any>>, PluginNames extends string | number | symbol> = Readonly<{
|
|
3
|
-
[K in PluginNames as `${K extends string ? K : never}State`]: API[K] extends
|
|
4
|
-
BasePluginDependenciesAPI<any> | undefined ? ReturnType<API[K]['sharedState']['currentState']> : never;
|
|
3
|
+
[K in PluginNames as `${K extends string ? K : never}State`]: API[K] extends BasePluginDependenciesAPI<any> | undefined ? ReturnType<API[K]['sharedState']['currentState']> : never;
|
|
5
4
|
}>;
|
|
6
5
|
type ExtractPluginNames<API extends EditorInjectionAPI<any, any>> = keyof API;
|
|
7
6
|
type Cleanup = () => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function startMeasure(measureName: string): void;
|
|
2
2
|
export declare function stopMeasure(measureName: string, onMeasureComplete?: (duration: number, startTime: number) => void): void;
|
|
3
3
|
export declare function clearMeasure(measureName: string): void;
|
|
4
|
+
export declare function isMeasuring(measureName: string): boolean;
|
|
@@ -154,7 +154,8 @@ export declare enum ACTION {
|
|
|
154
154
|
UPLOAD_SUCCEEDED = "uploadSucceeded",
|
|
155
155
|
UPLOAD_FAILED = "uploadFailed",
|
|
156
156
|
TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap",
|
|
157
|
-
RESIZED = "resized"
|
|
157
|
+
RESIZED = "resized",
|
|
158
|
+
BLOCKS_DRAG_INIT = "blocksDragInit"
|
|
158
159
|
}
|
|
159
160
|
export declare enum INPUT_METHOD {
|
|
160
161
|
ASCII = "ascii",
|
|
@@ -183,6 +183,11 @@ type InvalidMediaContentTransformedAEP = OperationalAEP<ACTION.INVALID_MEDIA_CON
|
|
|
183
183
|
type CollabStepsTrackerPayloadAEP = OperationalAEP<ACTION.STEPS_TRACKED | ACTION.STEPS_FILTERED, ACTION_SUBJECT.COLLAB, undefined, {
|
|
184
184
|
steps: unknown[];
|
|
185
185
|
}>;
|
|
186
|
+
type BlocksDragInitAEP = OperationalAEP<ACTION.BLOCKS_DRAG_INIT, ACTION_SUBJECT.EDITOR, undefined, {
|
|
187
|
+
duration: number;
|
|
188
|
+
startTime: number;
|
|
189
|
+
nodesCount: number;
|
|
190
|
+
}>;
|
|
186
191
|
type HeadingAnchorLinkButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.HEADING_ANCHOR_LINK, undefined>;
|
|
187
192
|
type CodeBlockWordWrapToggleAEP = TrackAEP<ACTION.TOGGLE_CODE_BLOCK_WRAP, ACTION_SUBJECT.CODE_BLOCK, undefined, {
|
|
188
193
|
platform: PLATFORMS;
|
|
@@ -200,5 +205,5 @@ type CopyLinkToAnchorButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.COPY_LINK_TO_ANCHOR
|
|
|
200
205
|
extensionType?: string;
|
|
201
206
|
isLivePage?: boolean;
|
|
202
207
|
}>;
|
|
203
|
-
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | CopyLinkToAnchorButtonAEP;
|
|
208
|
+
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockWordWrapToggleAEP | RequestToEditAEP | CopyLinkToAnchorButtonAEP;
|
|
204
209
|
export {};
|
|
@@ -6,7 +6,6 @@ export declare const codeBlockWrappedStates: WeakMap<PmNode, boolean | undefined
|
|
|
6
6
|
export declare const isCodeBlockWordWrapEnabled: (codeBlockNode: PmNode) => boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Swap the old node key with the new node key in the wrapped states WeakMap.
|
|
9
|
-
* Replaced with updateCodeBlockWrappedStateNodeKeys() under 'editor_code_block_wrapping_language_change_bug' feature gate.
|
|
10
9
|
*/
|
|
11
10
|
export declare const transferCodeBlockWrappedValue: (oldCodeBlockNode: PmNode, newCodeBlockNode: PmNode) => void;
|
|
12
11
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BasePluginDependenciesAPI, EditorInjectionAPI, ExtractInjectionAPI, NextEditorPlugin } from '../types/next-editor-plugin';
|
|
2
2
|
type NamedPluginStatesFromInjectionAPI<API extends ExtractInjectionAPI<NextEditorPlugin<any, any>>, PluginNames extends string | number | symbol> = Readonly<{
|
|
3
|
-
[K in PluginNames as `${K extends string ? K : never}State`]: API[K] extends
|
|
4
|
-
BasePluginDependenciesAPI<any> | undefined ? ReturnType<API[K]['sharedState']['currentState']> : never;
|
|
3
|
+
[K in PluginNames as `${K extends string ? K : never}State`]: API[K] extends BasePluginDependenciesAPI<any> | undefined ? ReturnType<API[K]['sharedState']['currentState']> : never;
|
|
5
4
|
}>;
|
|
6
5
|
type ExtractPluginNames<API extends EditorInjectionAPI<any, any>> = keyof API;
|
|
7
6
|
type Cleanup = () => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function startMeasure(measureName: string): void;
|
|
2
2
|
export declare function stopMeasure(measureName: string, onMeasureComplete?: (duration: number, startTime: number) => void): void;
|
|
3
3
|
export declare function clearMeasure(measureName: string): void;
|
|
4
|
+
export declare function isMeasuring(measureName: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "98.0
|
|
3
|
+
"version": "98.1.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/"
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@atlaskit/media-picker": "^67.0.0",
|
|
142
142
|
"@atlaskit/media-ui": "^27.2.0",
|
|
143
143
|
"@atlaskit/media-viewer": "49.5.2",
|
|
144
|
-
"@atlaskit/mention": "^23.
|
|
144
|
+
"@atlaskit/mention": "^23.6.0",
|
|
145
145
|
"@atlaskit/menu": "^2.13.0",
|
|
146
146
|
"@atlaskit/onboarding": "^12.2.0",
|
|
147
147
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
@@ -248,9 +248,6 @@
|
|
|
248
248
|
"editor_inline_comments_paste_insert_nodes": {
|
|
249
249
|
"type": "boolean"
|
|
250
250
|
},
|
|
251
|
-
"editor_code_block_wrapping_language_change_bug": {
|
|
252
|
-
"type": "boolean"
|
|
253
|
-
},
|
|
254
251
|
"platform_editor_react18_mention_with_provider_fix": {
|
|
255
252
|
"type": "boolean"
|
|
256
253
|
},
|