@atlaskit/editor-plugin-block-type 10.1.4 → 10.2.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,24 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 10.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 10.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`5167552fe1a93`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5167552fe1a93) -
14
+ [EDITOR-2339] Bump @atlaskit/adf-schema to 51.3.0
15
+
16
+ ### Patch Changes
17
+
18
+ - [`2e5e55a02ab9a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2e5e55a02ab9a) -
19
+ upgrade browser util api
20
+ - Updated dependencies
21
+
3
22
  ## 10.1.4
4
23
 
5
24
  ### Patch Changes
@@ -11,6 +11,7 @@ var _browser = require("@atlaskit/editor-common/browser");
11
11
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
12
12
  var _state = require("@atlaskit/editor-prosemirror/state");
13
13
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
15
  var _blockTypes = require("./block-types");
15
16
  var _blockType = require("./commands/block-type");
16
17
  var _consts = require("./consts");
@@ -144,11 +145,12 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
144
145
  // Check for numpad keys if not found in digits row
145
146
  headingLevel = _consts.HEADING_NUMPAD_KEYS.indexOf(event.keyCode);
146
147
  }
148
+ var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
147
149
  if (headingLevel > -1 && event.altKey) {
148
- if (_browser.browser.mac && event.metaKey) {
150
+ if (browser.mac && event.metaKey) {
149
151
  var _editorAPI$core$actio, _editorAPI$core;
150
152
  return (_editorAPI$core$actio = editorAPI === null || editorAPI === void 0 || (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 ? void 0 : _editorAPI$core.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio !== void 0 ? _editorAPI$core$actio : false;
151
- } else if (!_browser.browser.mac && event.ctrlKey && altKeyLocation !== event.DOM_KEY_LOCATION_RIGHT) {
153
+ } else if (!browser.mac && event.ctrlKey && altKeyLocation !== event.DOM_KEY_LOCATION_RIGHT) {
152
154
  var _editorAPI$core$actio2, _editorAPI$core2;
153
155
  return (_editorAPI$core$actio2 = editorAPI === null || editorAPI === void 0 || (_editorAPI$core2 = editorAPI.core) === null || _editorAPI$core2 === void 0 ? void 0 : _editorAPI$core2.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio2 !== void 0 ? _editorAPI$core$actio2 : false;
154
156
  }
@@ -1,8 +1,9 @@
1
1
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import { browser } from '@atlaskit/editor-common/browser';
2
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
5
5
  import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES, getBlockTypesInDropdown } from './block-types';
7
8
  import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from './commands/block-type';
8
9
  import { HEADING_KEYS, HEADING_NUMPAD_KEYS } from './consts';
@@ -130,6 +131,7 @@ export const createPlugin = (editorAPI, dispatch, lastNodeMustBeParagraph, inclu
130
131
  // Check for numpad keys if not found in digits row
131
132
  headingLevel = HEADING_NUMPAD_KEYS.indexOf(event.keyCode);
132
133
  }
134
+ const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
133
135
  if (headingLevel > -1 && event.altKey) {
134
136
  if (browser.mac && event.metaKey) {
135
137
  var _editorAPI$core$actio, _editorAPI$core;
@@ -2,10 +2,11 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
- import { browser } from '@atlaskit/editor-common/browser';
5
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
7
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
10
  import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES, getBlockTypesInDropdown } from './block-types';
10
11
  import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from './commands/block-type';
11
12
  import { HEADING_KEYS, HEADING_NUMPAD_KEYS } from './consts';
@@ -137,6 +138,7 @@ export var createPlugin = function createPlugin(editorAPI, dispatch, lastNodeMus
137
138
  // Check for numpad keys if not found in digits row
138
139
  headingLevel = HEADING_NUMPAD_KEYS.indexOf(event.keyCode);
139
140
  }
141
+ var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
140
142
  if (headingLevel > -1 && event.altKey) {
141
143
  if (browser.mac && event.metaKey) {
142
144
  var _editorAPI$core$actio, _editorAPI$core;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "10.1.4",
3
+ "version": "10.2.1",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,17 +29,17 @@
29
29
  ],
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
- "@atlaskit/adf-schema": "^51.2.0",
32
+ "@atlaskit/adf-schema": "^51.3.0",
33
33
  "@atlaskit/css": "^0.15.0",
34
- "@atlaskit/editor-plugin-analytics": "^6.1.0",
35
- "@atlaskit/editor-plugin-block-menu": "^4.0.0",
36
- "@atlaskit/editor-plugin-list": "^8.1.0",
34
+ "@atlaskit/editor-plugin-analytics": "^6.2.0",
35
+ "@atlaskit/editor-plugin-block-menu": "^5.0.0",
36
+ "@atlaskit/editor-plugin-list": "^8.2.0",
37
37
  "@atlaskit/editor-plugin-primary-toolbar": "^7.0.0",
38
38
  "@atlaskit/editor-plugin-selection": "^6.1.0",
39
39
  "@atlaskit/editor-plugin-selection-toolbar": "^7.0.0",
40
40
  "@atlaskit/editor-plugin-toolbar": "^3.3.0",
41
41
  "@atlaskit/editor-prosemirror": "7.0.0",
42
- "@atlaskit/editor-shared-styles": "^3.7.0",
42
+ "@atlaskit/editor-shared-styles": "^3.8.0",
43
43
  "@atlaskit/editor-tables": "^2.9.0",
44
44
  "@atlaskit/editor-toolbar": "^0.15.0",
45
45
  "@atlaskit/editor-toolbar-model": "^0.2.0",
@@ -47,17 +47,17 @@
47
47
  "@atlaskit/icon-lab": "^5.10.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
50
- "@atlaskit/primitives": "^15.0.0",
50
+ "@atlaskit/primitives": "^16.0.0",
51
51
  "@atlaskit/prosemirror-history": "^0.2.0",
52
52
  "@atlaskit/prosemirror-input-rules": "^3.5.0",
53
53
  "@atlaskit/theme": "^21.0.0",
54
- "@atlaskit/tmp-editor-statsig": "^13.13.0",
54
+ "@atlaskit/tmp-editor-statsig": "^13.16.0",
55
55
  "@atlaskit/tokens": "^7.0.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@emotion/react": "^11.7.1"
58
58
  },
59
59
  "peerDependencies": {
60
- "@atlaskit/editor-common": "^110.13.0",
60
+ "@atlaskit/editor-common": "^110.15.0",
61
61
  "react": "^18.2.0",
62
62
  "react-dom": "^18.2.0",
63
63
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -66,7 +66,7 @@
66
66
  "@af/visual-regression": "workspace:^",
67
67
  "@atlaskit/analytics-next": "^11.1.0",
68
68
  "@atlaskit/editor-plugin-quick-insert": "^6.0.0",
69
- "@atlaskit/editor-plugin-type-ahead": "^6.4.0",
69
+ "@atlaskit/editor-plugin-type-ahead": "^6.5.0",
70
70
  "@atlaskit/ssr": "workspace:^",
71
71
  "@testing-library/react": "^13.4.0",
72
72
  "@testing-library/user-event": "^14.4.3",