@atlaskit/editor-plugin-base 1.2.1 → 1.3.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-base
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#102243](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102243)
8
+ [`cfc95dac3d82`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cfc95dac3d82) -
9
+ Use new paragraph and heading NodeSpecs
10
+
3
11
  ## 1.2.1
4
12
 
5
13
  ### Patch Changes
@@ -11,6 +11,7 @@ var _adfSchema = require("@atlaskit/adf-schema");
11
11
  var _keymaps = require("@atlaskit/editor-common/keymaps");
12
12
  var _commands = require("@atlaskit/editor-prosemirror/commands");
13
13
  var _history = require("@atlaskit/editor-prosemirror/history");
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var _commands2 = require("./commands");
15
16
  var _disableSpellChecking = _interopRequireDefault(require("./pm-plugins/disable-spell-checking"));
16
17
  var _filterSteps = _interopRequireDefault(require("./pm-plugins/filter-steps"));
@@ -110,12 +111,13 @@ var basePlugin = function basePlugin(_ref) {
110
111
  return plugins;
111
112
  },
112
113
  nodes: function nodes() {
114
+ var paragraphNode = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.enable-localid-for-paragraph-in-stage-0_cby7g') ? _adfSchema.paragraphStage0 : _adfSchema.paragraph;
113
115
  return [{
114
116
  name: 'doc',
115
117
  node: _adfSchema.doc
116
118
  }, {
117
119
  name: 'paragraph',
118
- node: _adfSchema.paragraph
120
+ node: paragraphNode
119
121
  }, {
120
122
  name: 'text',
121
123
  node: _adfSchema.text
@@ -1,7 +1,8 @@
1
- import { doc, paragraph, text } from '@atlaskit/adf-schema';
1
+ import { doc, paragraph, paragraphStage0, text } from '@atlaskit/adf-schema';
2
2
  import { keymap } from '@atlaskit/editor-common/keymaps';
3
3
  import { baseKeymap } from '@atlaskit/editor-prosemirror/commands';
4
4
  import { history } from '@atlaskit/editor-prosemirror/history';
5
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
6
  import { setKeyboardHeight } from './commands';
6
7
  import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
7
8
  import filterStepsPlugin from './pm-plugins/filter-steps';
@@ -85,12 +86,13 @@ const basePlugin = ({
85
86
  return plugins;
86
87
  },
87
88
  nodes() {
89
+ const paragraphNode = getBooleanFF('platform.editor.enable-localid-for-paragraph-in-stage-0_cby7g') ? paragraphStage0 : paragraph;
88
90
  return [{
89
91
  name: 'doc',
90
92
  node: doc
91
93
  }, {
92
94
  name: 'paragraph',
93
- node: paragraph
95
+ node: paragraphNode
94
96
  }, {
95
97
  name: 'text',
96
98
  node: text
@@ -1,10 +1,11 @@
1
1
  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
- import { doc, paragraph, text } from '@atlaskit/adf-schema';
4
+ import { doc, paragraph, paragraphStage0, text } from '@atlaskit/adf-schema';
5
5
  import { keymap } from '@atlaskit/editor-common/keymaps';
6
6
  import { baseKeymap } from '@atlaskit/editor-prosemirror/commands';
7
7
  import { history } from '@atlaskit/editor-prosemirror/history';
8
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
9
  import { setKeyboardHeight } from './commands';
9
10
  import disableSpellcheckingPlugin from './pm-plugins/disable-spell-checking';
10
11
  import filterStepsPlugin from './pm-plugins/filter-steps';
@@ -100,12 +101,13 @@ var basePlugin = function basePlugin(_ref) {
100
101
  return plugins;
101
102
  },
102
103
  nodes: function nodes() {
104
+ var paragraphNode = getBooleanFF('platform.editor.enable-localid-for-paragraph-in-stage-0_cby7g') ? paragraphStage0 : paragraph;
103
105
  return [{
104
106
  name: 'doc',
105
107
  node: doc
106
108
  }, {
107
109
  name: 'paragraph',
108
- node: paragraph
110
+ node: paragraphNode
109
111
  }, {
110
112
  name: 'text',
111
113
  node: text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-base",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "Base plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,6 +37,7 @@
37
37
  "@atlaskit/editor-plugin-context-identifier": "^1.1.0",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^1.1.0",
39
39
  "@atlaskit/editor-prosemirror": "4.0.1",
40
+ "@atlaskit/platform-feature-flags": "^0.2.5",
40
41
  "@babel/runtime": "^7.0.0"
41
42
  },
42
43
  "devDependencies": {
@@ -72,6 +73,11 @@
72
73
  ]
73
74
  }
74
75
  },
76
+ "platform-feature-flags": {
77
+ "platform.editor.enable-localid-for-paragraph-in-stage-0_cby7g": {
78
+ "type": "boolean"
79
+ }
80
+ },
75
81
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0",
76
82
  "stricter": {
77
83
  "no-unused-dependencies": {
package/tsconfig.app.json CHANGED
@@ -40,6 +40,9 @@
40
40
  },
41
41
  {
42
42
  "path": "../editor-plugin-feature-flags/tsconfig.app.json"
43
+ },
44
+ {
45
+ "path": "../../platform/feature-flags/tsconfig.app.json"
43
46
  }
44
47
  ]
45
48
  }