@atlaskit/editor-core 217.0.2 → 217.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 217.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b941a7ee841df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b941a7ee841df) -
8
+ EDITOR-5683 update outdated browser list to exclude browser versions before March 2024
9
+ - Updated dependencies
10
+
11
+ ## 217.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`bf1f23f4a76d0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bf1f23f4a76d0) -
16
+ Add 'small text' as a menu dropdown item in the editor, non functional. Also adds a new universal
17
+ preset config option to support feature.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 217.0.2
4
24
 
5
25
  ### Patch Changes
@@ -98,6 +98,7 @@ function createUniversalPresetInternal(_ref) {
98
98
  return featureFlags;
99
99
  };
100
100
  var defaultPreset = (0, _default.createDefaultPreset)(_objectSpread(_objectSpread({}, props), {}, {
101
+ blockType: _objectSpread(_objectSpread({}, props.blockType), initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.blockTypePlugin),
101
102
  appearance: appearance,
102
103
  createAnalyticsEvent: createAnalyticsEvent,
103
104
  hyperlinkOptions: _objectSpread({
@@ -4,46 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isOutdatedBrowser = void 0;
7
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
8
+ /* eslint-disable require-unicode-regexp */
9
+
7
10
  var isOutdatedBrowser = exports.isOutdatedBrowser = function isOutdatedBrowser(userAgent) {
8
11
  // Take browsers in both Desktop and Mobile (includes Chrome, Firefox, Edge and Safari) within last 2 years
9
- // Ignored via go/ees005
10
- // eslint-disable-next-line require-unicode-regexp
11
- // Ignored via go/ees005
12
- // eslint-disable-next-line require-unicode-regexp
13
12
  var chrome = /Chrome\//.test(userAgent) && !/OPR\//.test(userAgent);
14
- // Ignored via go/ees005
15
- // eslint-disable-next-line require-unicode-regexp
16
13
  var chromeVersion = chrome ? parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10) : 0;
17
- if (chromeVersion >= 84) {
14
+ if ((0, _expValEquals.expValEquals)('platform_editor_outdated_browser_update', 'isEnabled', true) ? chromeVersion >= 123 : chromeVersion >= 84) {
18
15
  return false;
19
16
  }
20
-
21
- // Ignored via go/ees005
22
- // eslint-disable-next-line require-unicode-regexp
23
17
  var gecko = /gecko\/\d/i.test(userAgent);
24
- // Ignored via go/ees005
25
- // eslint-disable-next-line require-unicode-regexp
26
18
  var geckoVersion = gecko ? parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10) : 0;
27
- if (geckoVersion >= 84) {
19
+ if ((0, _expValEquals.expValEquals)('platform_editor_outdated_browser_update', 'isEnabled', true) ? geckoVersion >= 124 : geckoVersion >= 84) {
28
20
  return false;
29
21
  }
30
-
31
- // Ignored via go/ees005
32
- // eslint-disable-next-line require-unicode-regexp
33
22
  var edge = /Edge\/(\d+)/.exec(userAgent);
34
23
  var edgeVersion = edge ? +edge[1] : 0;
35
- if (edgeVersion >= 84) {
24
+ if ((0, _expValEquals.expValEquals)('platform_editor_outdated_browser_update', 'isEnabled', true) ? edgeVersion >= 123 : edgeVersion >= 84) {
36
25
  return false;
37
26
  }
38
-
39
- // Ignored via go/ees005
40
- // eslint-disable-next-line require-unicode-regexp
41
27
  var safari = !chrome && !gecko && /Version\/([0-9\._]+).*Safari/.test(userAgent);
42
- var safariVersion = safari ?
43
- // Ignored via go/ees005
44
- // eslint-disable-next-line require-unicode-regexp
45
- parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
46
- if (safariVersion >= 12) {
28
+ var safariVersion = safari ? parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
29
+ if ((0, _expValEquals.expValEquals)('platform_editor_outdated_browser_update', 'isEnabled', true) ? safariVersion >= 17 : safariVersion >= 12) {
47
30
  return false;
48
31
  }
49
32
  return true;
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "217.0.1";
8
+ var version = exports.version = "217.1.0";
@@ -87,6 +87,10 @@ export default function createUniversalPresetInternal({
87
87
  const getEditorFeatureFlags = () => featureFlags;
88
88
  const defaultPreset = createDefaultPreset({
89
89
  ...props,
90
+ blockType: {
91
+ ...props.blockType,
92
+ ...(initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.blockTypePlugin)
93
+ },
90
94
  appearance,
91
95
  createAnalyticsEvent,
92
96
  hyperlinkOptions: {
@@ -1,43 +1,26 @@
1
+ /* eslint-disable require-unicode-regexp */
2
+
3
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
1
4
  export const isOutdatedBrowser = userAgent => {
2
5
  // Take browsers in both Desktop and Mobile (includes Chrome, Firefox, Edge and Safari) within last 2 years
3
- // Ignored via go/ees005
4
- // eslint-disable-next-line require-unicode-regexp
5
- // Ignored via go/ees005
6
- // eslint-disable-next-line require-unicode-regexp
7
6
  const chrome = /Chrome\//.test(userAgent) && !/OPR\//.test(userAgent);
8
- // Ignored via go/ees005
9
- // eslint-disable-next-line require-unicode-regexp
10
7
  const chromeVersion = chrome ? parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10) : 0;
11
- if (chromeVersion >= 84) {
8
+ if (expValEquals('platform_editor_outdated_browser_update', 'isEnabled', true) ? chromeVersion >= 123 : chromeVersion >= 84) {
12
9
  return false;
13
10
  }
14
-
15
- // Ignored via go/ees005
16
- // eslint-disable-next-line require-unicode-regexp
17
11
  const gecko = /gecko\/\d/i.test(userAgent);
18
- // Ignored via go/ees005
19
- // eslint-disable-next-line require-unicode-regexp
20
12
  const geckoVersion = gecko ? parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10) : 0;
21
- if (geckoVersion >= 84) {
13
+ if (expValEquals('platform_editor_outdated_browser_update', 'isEnabled', true) ? geckoVersion >= 124 : geckoVersion >= 84) {
22
14
  return false;
23
15
  }
24
-
25
- // Ignored via go/ees005
26
- // eslint-disable-next-line require-unicode-regexp
27
16
  const edge = /Edge\/(\d+)/.exec(userAgent);
28
17
  const edgeVersion = edge ? +edge[1] : 0;
29
- if (edgeVersion >= 84) {
18
+ if (expValEquals('platform_editor_outdated_browser_update', 'isEnabled', true) ? edgeVersion >= 123 : edgeVersion >= 84) {
30
19
  return false;
31
20
  }
32
-
33
- // Ignored via go/ees005
34
- // eslint-disable-next-line require-unicode-regexp
35
21
  const safari = !chrome && !gecko && /Version\/([0-9\._]+).*Safari/.test(userAgent);
36
- const safariVersion = safari ?
37
- // Ignored via go/ees005
38
- // eslint-disable-next-line require-unicode-regexp
39
- parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
40
- if (safariVersion >= 12) {
22
+ const safariVersion = safari ? parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
23
+ if (expValEquals('platform_editor_outdated_browser_update', 'isEnabled', true) ? safariVersion >= 17 : safariVersion >= 12) {
41
24
  return false;
42
25
  }
43
26
  return true;
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "217.0.1";
2
+ export const version = "217.1.0";
@@ -91,6 +91,7 @@ export default function createUniversalPresetInternal(_ref) {
91
91
  return featureFlags;
92
92
  };
93
93
  var defaultPreset = createDefaultPreset(_objectSpread(_objectSpread({}, props), {}, {
94
+ blockType: _objectSpread(_objectSpread({}, props.blockType), initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.blockTypePlugin),
94
95
  appearance: appearance,
95
96
  createAnalyticsEvent: createAnalyticsEvent,
96
97
  hyperlinkOptions: _objectSpread({
@@ -1,43 +1,26 @@
1
+ /* eslint-disable require-unicode-regexp */
2
+
3
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
1
4
  export var isOutdatedBrowser = function isOutdatedBrowser(userAgent) {
2
5
  // Take browsers in both Desktop and Mobile (includes Chrome, Firefox, Edge and Safari) within last 2 years
3
- // Ignored via go/ees005
4
- // eslint-disable-next-line require-unicode-regexp
5
- // Ignored via go/ees005
6
- // eslint-disable-next-line require-unicode-regexp
7
6
  var chrome = /Chrome\//.test(userAgent) && !/OPR\//.test(userAgent);
8
- // Ignored via go/ees005
9
- // eslint-disable-next-line require-unicode-regexp
10
7
  var chromeVersion = chrome ? parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10) : 0;
11
- if (chromeVersion >= 84) {
8
+ if (expValEquals('platform_editor_outdated_browser_update', 'isEnabled', true) ? chromeVersion >= 123 : chromeVersion >= 84) {
12
9
  return false;
13
10
  }
14
-
15
- // Ignored via go/ees005
16
- // eslint-disable-next-line require-unicode-regexp
17
11
  var gecko = /gecko\/\d/i.test(userAgent);
18
- // Ignored via go/ees005
19
- // eslint-disable-next-line require-unicode-regexp
20
12
  var geckoVersion = gecko ? parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10) : 0;
21
- if (geckoVersion >= 84) {
13
+ if (expValEquals('platform_editor_outdated_browser_update', 'isEnabled', true) ? geckoVersion >= 124 : geckoVersion >= 84) {
22
14
  return false;
23
15
  }
24
-
25
- // Ignored via go/ees005
26
- // eslint-disable-next-line require-unicode-regexp
27
16
  var edge = /Edge\/(\d+)/.exec(userAgent);
28
17
  var edgeVersion = edge ? +edge[1] : 0;
29
- if (edgeVersion >= 84) {
18
+ if (expValEquals('platform_editor_outdated_browser_update', 'isEnabled', true) ? edgeVersion >= 123 : edgeVersion >= 84) {
30
19
  return false;
31
20
  }
32
-
33
- // Ignored via go/ees005
34
- // eslint-disable-next-line require-unicode-regexp
35
21
  var safari = !chrome && !gecko && /Version\/([0-9\._]+).*Safari/.test(userAgent);
36
- var safariVersion = safari ?
37
- // Ignored via go/ees005
38
- // eslint-disable-next-line require-unicode-regexp
39
- parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
40
- if (safariVersion >= 12) {
22
+ var safariVersion = safari ? parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
23
+ if (expValEquals('platform_editor_outdated_browser_update', 'isEnabled', true) ? safariVersion >= 17 : safariVersion >= 12) {
41
24
  return false;
42
25
  }
43
26
  return true;
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "217.0.1";
2
+ export var version = "217.1.0";
@@ -15,6 +15,9 @@ export type UniversalPresetProps = DefaultPresetPluginOptions & EditorSharedProp
15
15
  * Note: not all plugins are configurable via this mechanism, and for plugins configured -- it is only doing a subset of the configuration.
16
16
  */
17
17
  export type InitialPluginConfiguration = {
18
+ blockTypePlugin?: {
19
+ allowFontSize?: boolean;
20
+ };
18
21
  emojiPlugin?: {
19
22
  disableAutoformat?: boolean;
20
23
  };
@@ -15,6 +15,9 @@ export type UniversalPresetProps = DefaultPresetPluginOptions & EditorSharedProp
15
15
  * Note: not all plugins are configurable via this mechanism, and for plugins configured -- it is only doing a subset of the configuration.
16
16
  */
17
17
  export type InitialPluginConfiguration = {
18
+ blockTypePlugin?: {
19
+ allowFontSize?: boolean;
20
+ };
18
21
  emojiPlugin?: {
19
22
  disableAutoformat?: boolean;
20
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "217.0.2",
3
+ "version": "217.1.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
67
67
  "@atlaskit/react-ufo": "^5.4.0",
68
68
  "@atlaskit/task-decision": "^19.3.0",
69
- "@atlaskit/tmp-editor-statsig": "^36.0.0",
69
+ "@atlaskit/tmp-editor-statsig": "^36.2.0",
70
70
  "@atlaskit/tokens": "^11.1.0",
71
71
  "@atlaskit/tooltip": "^20.14.0",
72
72
  "@atlaskit/width-detector": "^5.0.0",
@@ -83,7 +83,7 @@
83
83
  "uuid": "^3.1.0"
84
84
  },
85
85
  "peerDependencies": {
86
- "@atlaskit/editor-common": "^112.1.0",
86
+ "@atlaskit/editor-common": "^112.2.0",
87
87
  "@atlaskit/link-provider": "^4.2.0",
88
88
  "@atlaskit/media-core": "^37.0.0",
89
89
  "react": "^18.2.0",