@atlaskit/editor-plugin-emoji 1.1.5 → 1.1.7

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,42 @@
1
1
  # @atlaskit/editor-plugin-emoji
2
2
 
3
+ ## 1.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#78224](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78224) [`6b4c9dd4ad34`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6b4c9dd4ad34) - ED-22219: adf-schema updated to 35.5.2
8
+ - Updated dependencies
9
+
10
+ ## 1.1.6
11
+
12
+ ### Patch Changes
13
+
14
+ - [#75482](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75482) [`18b5a6fb910a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/18b5a6fb910a) - # MAJOR CHANGE to `@atlaskit/prosemirror-input-rules` package.
15
+
16
+ ## WHY?
17
+
18
+ Removing editor-common dependencies from prosemirror-input-rules package.
19
+
20
+ This makes it easier for editor updates because it simplifies our dependency graph.
21
+
22
+ ## WHAT and HOW?
23
+
24
+ These are no longer available via `@atlaskit/prosemirror-input-rules` but are available from `@atlaskit/editor-common/types`:
25
+
26
+ - InputRuleWrapper
27
+ - InputRuleHandler
28
+ - OnHandlerApply
29
+ - createRule
30
+
31
+ These have changed from a `SafePlugin` to a `SafePluginSpec`. In order to update your code you need to instantiate a `SafePlugin` (ie. `new SafePlugin(createPlugin( ... ))`).
32
+
33
+ `SafePlugin` exists in `@atlaskit/editor-common/safe-plugin`.
34
+
35
+ - createPlugin
36
+ - createInputRulePlugin
37
+
38
+ - Updated dependencies
39
+
3
40
  ## 1.1.5
4
41
 
5
42
  ### Patch Changes
@@ -15,6 +15,8 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
15
15
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _analytics = require("@atlaskit/editor-common/analytics");
18
+ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
19
+ var _utils = require("@atlaskit/editor-common/utils");
18
20
  var _state = require("@atlaskit/editor-prosemirror/state");
19
21
  var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
20
22
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -23,8 +25,8 @@ var matcher;
23
25
  function inputRulePlugin(schema, providerFactory, featureFlags, editorAnalyticsAPI) {
24
26
  if (schema.nodes.emoji && providerFactory) {
25
27
  initMatcher(providerFactory);
26
- var asciiEmojiRule = (0, _prosemirrorInputRules.createRule)(AsciiEmojiMatcher.REGEX, inputRuleHandler(editorAnalyticsAPI));
27
- return (0, _prosemirrorInputRules.createPlugin)('emoji', [asciiEmojiRule]);
28
+ var asciiEmojiRule = (0, _utils.createRule)(AsciiEmojiMatcher.REGEX, inputRuleHandler(editorAnalyticsAPI));
29
+ return new _safePlugin.SafePlugin((0, _prosemirrorInputRules.createPlugin)('emoji', [asciiEmojiRule]));
28
30
  }
29
31
  return;
30
32
  }
@@ -1,13 +1,15 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
+ import { createRule } from '@atlaskit/editor-common/utils';
3
5
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
- import { createPlugin, createRule, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
6
+ import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
5
7
  let matcher;
6
8
  export function inputRulePlugin(schema, providerFactory, featureFlags, editorAnalyticsAPI) {
7
9
  if (schema.nodes.emoji && providerFactory) {
8
10
  initMatcher(providerFactory);
9
11
  const asciiEmojiRule = createRule(AsciiEmojiMatcher.REGEX, inputRuleHandler(editorAnalyticsAPI));
10
- return createPlugin('emoji', [asciiEmojiRule]);
12
+ return new SafePlugin(createPlugin('emoji', [asciiEmojiRule]));
11
13
  }
12
14
  return;
13
15
  }
@@ -8,14 +8,16 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
9
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
10
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
11
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
12
+ import { createRule } from '@atlaskit/editor-common/utils';
11
13
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
12
- import { createPlugin, createRule, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
14
+ import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
13
15
  var matcher;
14
16
  export function inputRulePlugin(schema, providerFactory, featureFlags, editorAnalyticsAPI) {
15
17
  if (schema.nodes.emoji && providerFactory) {
16
18
  initMatcher(providerFactory);
17
19
  var asciiEmojiRule = createRule(AsciiEmojiMatcher.REGEX, inputRuleHandler(editorAnalyticsAPI));
18
- return createPlugin('emoji', [asciiEmojiRule]);
20
+ return new SafePlugin(createPlugin('emoji', [asciiEmojiRule]));
19
21
  }
20
22
  return;
21
23
  }
@@ -1,6 +1,6 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
6
6
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -1,6 +1,6 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
2
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
6
6
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-emoji",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "Emoji plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -21,13 +21,13 @@
21
21
  "runReact18": false
22
22
  },
23
23
  "dependencies": {
24
- "@atlaskit/adf-schema": "^35.5.1",
25
- "@atlaskit/editor-common": "^78.0.0",
24
+ "@atlaskit/adf-schema": "^35.5.2",
25
+ "@atlaskit/editor-common": "^78.10.0",
26
26
  "@atlaskit/editor-plugin-analytics": "^1.0.0",
27
27
  "@atlaskit/editor-plugin-type-ahead": "^1.0.0",
28
28
  "@atlaskit/editor-prosemirror": "3.0.0",
29
29
  "@atlaskit/emoji": "^67.6.0",
30
- "@atlaskit/prosemirror-input-rules": "^2.4.0",
30
+ "@atlaskit/prosemirror-input-rules": "^3.0.0",
31
31
  "@babel/runtime": "^7.0.0",
32
32
  "@emotion/react": "^11.7.1",
33
33
  "react-intl-next": "npm:react-intl@^5.18.1"