@atlaskit/editor-common 120.16.3 → 120.16.4
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 +10 -0
- package/dist/cjs/compiled-migration/withCompiledMigration.js +5 -5
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/utils.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/compiled-migration/withCompiledMigration.js +5 -5
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/utils.js +2 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/compiled-migration/withCompiledMigration.js +5 -5
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/utils.js +2 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/compiled-migration/withCompiledMigration.d.ts +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 120.16.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e29faa16e0c66`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e29faa16e0c66) -
|
|
8
|
+
Migrate selected editor experiment reads and tooling from tmp-editor-statsig to
|
|
9
|
+
platform-feature-experiments, including static CSS, floating ToC, insert-menu AI, table overflow
|
|
10
|
+
shadows, and collapsible headings.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 120.16.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.withCompiledMigration = withCompiledMigration;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
|
-
var
|
|
10
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
11
11
|
/**
|
|
12
12
|
* @jsxRuntime classic
|
|
13
13
|
* @jsx jsx
|
|
@@ -28,7 +28,7 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
|
28
28
|
/**
|
|
29
29
|
* A HOC that enables per-component feature-gated migration from Emotion to Compiled CSS-in-JS.
|
|
30
30
|
*
|
|
31
|
-
* When the `
|
|
31
|
+
* When the `platform_editor_renderer_static_css` experiment is ON:
|
|
32
32
|
* - Renders the component directly. Compiled's statically-extracted CSS classes are applied
|
|
33
33
|
* via the component's own `css` prop (using the Compiled pragma in the component file).
|
|
34
34
|
* - No Emotion code runs at all.
|
|
@@ -48,7 +48,7 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
|
48
48
|
* // app.tsx — the call site handles both compiled and emotion styles.
|
|
49
49
|
* import { css } from '@compiled/react';
|
|
50
50
|
* import { css as emotionCss } from '@emotion/react';
|
|
51
|
-
* import {
|
|
51
|
+
* import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
52
52
|
* import { withCompiledMigration } from '@atlaskit/editor-common/compiled-migration';
|
|
53
53
|
* import { Button } from './button';
|
|
54
54
|
*
|
|
@@ -62,7 +62,7 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
|
62
62
|
* export function App() {
|
|
63
63
|
* return (
|
|
64
64
|
* <StyledButton
|
|
65
|
-
* css={[
|
|
65
|
+
* css={[isExperimentEnabled('platform_editor_renderer_static_css') && compiledStyles]}
|
|
66
66
|
* />
|
|
67
67
|
* );
|
|
68
68
|
* }
|
|
@@ -75,7 +75,7 @@ function withCompiledMigration(WrappedComponent, emotionStyles) {
|
|
|
75
75
|
// so TypeScript accepts the css prop in the emotion branch while preserving P.
|
|
76
76
|
var Comp = WrappedComponent;
|
|
77
77
|
function MigrationGatedComponent(props) {
|
|
78
|
-
var compiledEnabled = (0,
|
|
78
|
+
var compiledEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_renderer_static_css');
|
|
79
79
|
if (compiledEnabled) {
|
|
80
80
|
// Experiment ON — render directly. Compiled's statically-extracted CSS classes
|
|
81
81
|
// are applied inside the component via its own css prop. No Emotion code runs.
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "120.16.
|
|
30
|
+
var packageVersion = "120.16.3";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -10,8 +10,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _fuse = _interopRequireDefault(require("fuse.js"));
|
|
12
12
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
13
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
13
14
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
15
|
var _boostNativeResultsAboveSkills = require("./boost-native-results-above-skills");
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -87,7 +87,7 @@ function find(query, items, prioritySortingFn) {
|
|
|
87
87
|
var results = fuse.search(query);
|
|
88
88
|
|
|
89
89
|
// platform_editor_insert_menu_ai: boost native editor elements above skills
|
|
90
|
-
var rerankedResults = (0,
|
|
90
|
+
var rerankedResults = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_insert_menu_ai') ? (0, _boostNativeResultsAboveSkills.boostNativeResultsAboveSkills)(results) : results;
|
|
91
91
|
if ((0, _fg.fg)('jim-lower-ranking-in-jira-macro-search')) {
|
|
92
92
|
var _rerankedResults$data, _rerankedResults$lega;
|
|
93
93
|
// searching for jira work items macro first
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "120.16.
|
|
27
|
+
var packageVersion = "120.16.3";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -16,12 +16,12 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: this file must use emotion's JSX pragma to apply emotion styles via the css prop
|
|
18
18
|
import { jsx } from '@emotion/react';
|
|
19
|
-
import {
|
|
19
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* A HOC that enables per-component feature-gated migration from Emotion to Compiled CSS-in-JS.
|
|
23
23
|
*
|
|
24
|
-
* When the `
|
|
24
|
+
* When the `platform_editor_renderer_static_css` experiment is ON:
|
|
25
25
|
* - Renders the component directly. Compiled's statically-extracted CSS classes are applied
|
|
26
26
|
* via the component's own `css` prop (using the Compiled pragma in the component file).
|
|
27
27
|
* - No Emotion code runs at all.
|
|
@@ -41,7 +41,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
41
41
|
* // app.tsx — the call site handles both compiled and emotion styles.
|
|
42
42
|
* import { css } from '@compiled/react';
|
|
43
43
|
* import { css as emotionCss } from '@emotion/react';
|
|
44
|
-
* import {
|
|
44
|
+
* import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
45
45
|
* import { withCompiledMigration } from '@atlaskit/editor-common/compiled-migration';
|
|
46
46
|
* import { Button } from './button';
|
|
47
47
|
*
|
|
@@ -55,7 +55,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
55
55
|
* export function App() {
|
|
56
56
|
* return (
|
|
57
57
|
* <StyledButton
|
|
58
|
-
* css={[
|
|
58
|
+
* css={[isExperimentEnabled('platform_editor_renderer_static_css') && compiledStyles]}
|
|
59
59
|
* />
|
|
60
60
|
* );
|
|
61
61
|
* }
|
|
@@ -68,7 +68,7 @@ export function withCompiledMigration(WrappedComponent, emotionStyles) {
|
|
|
68
68
|
// so TypeScript accepts the css prop in the emotion branch while preserving P.
|
|
69
69
|
const Comp = WrappedComponent;
|
|
70
70
|
function MigrationGatedComponent(props) {
|
|
71
|
-
const compiledEnabled =
|
|
71
|
+
const compiledEnabled = isExperimentEnabled('platform_editor_renderer_static_css');
|
|
72
72
|
if (compiledEnabled) {
|
|
73
73
|
// Experiment ON — render directly. Compiled's statically-extracted CSS classes
|
|
74
74
|
// are applied inside the component via its own css prop. No Emotion code runs.
|
|
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
13
13
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
14
14
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
15
15
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
16
|
-
const packageVersion = "120.16.
|
|
16
|
+
const packageVersion = "120.16.3";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Fuse from 'fuse.js';
|
|
2
2
|
import memoizeOne from 'memoize-one';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
4
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
5
|
import { boostNativeResultsAboveSkills } from './boost-native-results-above-skills';
|
|
6
6
|
const processQuickInsertItems = (items, intl) => {
|
|
7
7
|
return items.reduce((acc, item) => {
|
|
@@ -71,7 +71,7 @@ export function find(query, items, prioritySortingFn) {
|
|
|
71
71
|
const results = fuse.search(query);
|
|
72
72
|
|
|
73
73
|
// platform_editor_insert_menu_ai: boost native editor elements above skills
|
|
74
|
-
const rerankedResults =
|
|
74
|
+
const rerankedResults = isExperimentEnabled('platform_editor_insert_menu_ai') ? boostNativeResultsAboveSkills(results) : results;
|
|
75
75
|
if (fg('jim-lower-ranking-in-jira-macro-search')) {
|
|
76
76
|
var _rerankedResults$data, _rerankedResults$lega;
|
|
77
77
|
// searching for jira work items macro first
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "120.16.
|
|
17
|
+
const packageVersion = "120.16.3";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -16,12 +16,12 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: this file must use emotion's JSX pragma to apply emotion styles via the css prop
|
|
18
18
|
import { jsx } from '@emotion/react';
|
|
19
|
-
import {
|
|
19
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* A HOC that enables per-component feature-gated migration from Emotion to Compiled CSS-in-JS.
|
|
23
23
|
*
|
|
24
|
-
* When the `
|
|
24
|
+
* When the `platform_editor_renderer_static_css` experiment is ON:
|
|
25
25
|
* - Renders the component directly. Compiled's statically-extracted CSS classes are applied
|
|
26
26
|
* via the component's own `css` prop (using the Compiled pragma in the component file).
|
|
27
27
|
* - No Emotion code runs at all.
|
|
@@ -41,7 +41,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
41
41
|
* // app.tsx — the call site handles both compiled and emotion styles.
|
|
42
42
|
* import { css } from '@compiled/react';
|
|
43
43
|
* import { css as emotionCss } from '@emotion/react';
|
|
44
|
-
* import {
|
|
44
|
+
* import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
45
45
|
* import { withCompiledMigration } from '@atlaskit/editor-common/compiled-migration';
|
|
46
46
|
* import { Button } from './button';
|
|
47
47
|
*
|
|
@@ -55,7 +55,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
55
55
|
* export function App() {
|
|
56
56
|
* return (
|
|
57
57
|
* <StyledButton
|
|
58
|
-
* css={[
|
|
58
|
+
* css={[isExperimentEnabled('platform_editor_renderer_static_css') && compiledStyles]}
|
|
59
59
|
* />
|
|
60
60
|
* );
|
|
61
61
|
* }
|
|
@@ -68,7 +68,7 @@ export function withCompiledMigration(WrappedComponent, emotionStyles) {
|
|
|
68
68
|
// so TypeScript accepts the css prop in the emotion branch while preserving P.
|
|
69
69
|
var Comp = WrappedComponent;
|
|
70
70
|
function MigrationGatedComponent(props) {
|
|
71
|
-
var compiledEnabled =
|
|
71
|
+
var compiledEnabled = isExperimentEnabled('platform_editor_renderer_static_css');
|
|
72
72
|
if (compiledEnabled) {
|
|
73
73
|
// Experiment ON — render directly. Compiled's statically-extracted CSS classes
|
|
74
74
|
// are applied inside the component via its own css prop. No Emotion code runs.
|
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "120.16.
|
|
22
|
+
var packageVersion = "120.16.3";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -4,8 +4,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import Fuse from 'fuse.js';
|
|
6
6
|
import memoizeOne from 'memoize-one';
|
|
7
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
import { boostNativeResultsAboveSkills } from './boost-native-results-above-skills';
|
|
10
10
|
var processQuickInsertItems = function processQuickInsertItems(items, intl) {
|
|
11
11
|
return items.reduce(function (acc, item) {
|
|
@@ -79,7 +79,7 @@ export function find(query, items, prioritySortingFn) {
|
|
|
79
79
|
var results = fuse.search(query);
|
|
80
80
|
|
|
81
81
|
// platform_editor_insert_menu_ai: boost native editor elements above skills
|
|
82
|
-
var rerankedResults =
|
|
82
|
+
var rerankedResults = isExperimentEnabled('platform_editor_insert_menu_ai') ? boostNativeResultsAboveSkills(results) : results;
|
|
83
83
|
if (fg('jim-lower-ranking-in-jira-macro-search')) {
|
|
84
84
|
var _rerankedResults$data, _rerankedResults$lega;
|
|
85
85
|
// searching for jira work items macro first
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "120.16.
|
|
24
|
+
var packageVersion = "120.16.3";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -17,7 +17,7 @@ import { type SerializedStyles } from '@emotion/react';
|
|
|
17
17
|
/**
|
|
18
18
|
* A HOC that enables per-component feature-gated migration from Emotion to Compiled CSS-in-JS.
|
|
19
19
|
*
|
|
20
|
-
* When the `
|
|
20
|
+
* When the `platform_editor_renderer_static_css` experiment is ON:
|
|
21
21
|
* - Renders the component directly. Compiled's statically-extracted CSS classes are applied
|
|
22
22
|
* via the component's own `css` prop (using the Compiled pragma in the component file).
|
|
23
23
|
* - No Emotion code runs at all.
|
|
@@ -37,7 +37,7 @@ import { type SerializedStyles } from '@emotion/react';
|
|
|
37
37
|
* // app.tsx — the call site handles both compiled and emotion styles.
|
|
38
38
|
* import { css } from '@compiled/react';
|
|
39
39
|
* import { css as emotionCss } from '@emotion/react';
|
|
40
|
-
* import {
|
|
40
|
+
* import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
41
41
|
* import { withCompiledMigration } from '@atlaskit/editor-common/compiled-migration';
|
|
42
42
|
* import { Button } from './button';
|
|
43
43
|
*
|
|
@@ -51,7 +51,7 @@ import { type SerializedStyles } from '@emotion/react';
|
|
|
51
51
|
* export function App() {
|
|
52
52
|
* return (
|
|
53
53
|
* <StyledButton
|
|
54
|
-
* css={[
|
|
54
|
+
* css={[isExperimentEnabled('platform_editor_renderer_static_css') && compiledStyles]}
|
|
55
55
|
* />
|
|
56
56
|
* );
|
|
57
57
|
* }
|
package/package.json
CHANGED