@atlaskit/editor-plugin-limited-mode 3.1.0 → 3.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,14 @@
1
1
  # @atlaskit/editor-plugin-limited-mode
2
2
 
3
+ ## 3.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
8
+ ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
9
+ project refs are setup
10
+ - Updated dependencies
11
+
3
12
  ## 3.1.0
4
13
 
5
14
  ### Minor Changes
@@ -2,7 +2,7 @@
2
2
  "extends": "../../../../tsconfig.entry-points.jira.json",
3
3
  "compilerOptions": {
4
4
  "target": "es5",
5
- "outDir": "../../../../../tsDist/@atlaskit__editor-plugin-limited-mode/app",
5
+ "outDir": "../../../../../jira/tsDist/@atlaskit__editor-plugin-limited-mode/app",
6
6
  "rootDir": "../",
7
7
  "composite": true
8
8
  },
@@ -15,16 +15,21 @@ var limitedModePluginKey = exports.limitedModePluginKey = new _state.PluginKey('
15
15
  var createPlugin = exports.createPlugin = function createPlugin() {
16
16
  return new _safePlugin.SafePlugin({
17
17
  key: limitedModePluginKey,
18
+ // @ts-ignore - Workaround for help-center local consumption
19
+
18
20
  view: function view(_view) {
19
21
  return {};
20
22
  },
21
23
  state: {
24
+ // @ts-ignore - Workaround for help-center local consumption
22
25
  init: function init(config, editorState) {
23
26
  if ((0, _expVal.expVal)('cc_editor_limited_mode_include_lcm', 'isEnabled', true)) {
24
27
  // calculates the size of the doc, where when there are legacy content macros, the content
25
28
  // is stored in the attrs.
26
29
  // This is essentiall doc.nod
27
30
  var customDocSize = editorState.doc.nodeSize;
31
+ // @ts-ignore - Workaround for help-center local consumption
32
+
28
33
  editorState.doc.descendants(function (node) {
29
34
  var _node$attrs;
30
35
  if (((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionKey) === 'legacy-content') {
@@ -46,6 +51,8 @@ var createPlugin = exports.createPlugin = function createPlugin() {
46
51
  };
47
52
  }
48
53
  },
54
+ // @ts-ignore - Workaround for help-center local consumption
55
+
49
56
  apply: function apply(tr, currentPluginState) {
50
57
  // Don't check the document size if we're already in limited mode.
51
58
  // We ALWAYS want to re-check the document size if we're replacing the document (e.g. live-to-live page navigation).
@@ -57,6 +64,8 @@ var createPlugin = exports.createPlugin = function createPlugin() {
57
64
  // is stored in the attrs.
58
65
  // This is essentiall doc.nod
59
66
  var customDocSize = tr.doc.nodeSize;
67
+ // @ts-ignore - Workaround for help-center local consumption
68
+
60
69
  tr.doc.descendants(function (node) {
61
70
  var _node$attrs3;
62
71
  if (((_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.extensionKey) === 'legacy-content') {
@@ -5,16 +5,22 @@ export const limitedModePluginKey = new PluginKey('limitedModePlugin');
5
5
  export const createPlugin = () => {
6
6
  return new SafePlugin({
7
7
  key: limitedModePluginKey,
8
+ // @ts-ignore - Workaround for help-center local consumption
9
+
8
10
  view: _view => {
9
11
  return {};
10
12
  },
11
13
  state: {
14
+ // @ts-ignore - Workaround for help-center local consumption
15
+
12
16
  init(config, editorState) {
13
17
  if (expVal('cc_editor_limited_mode_include_lcm', 'isEnabled', true)) {
14
18
  // calculates the size of the doc, where when there are legacy content macros, the content
15
19
  // is stored in the attrs.
16
20
  // This is essentiall doc.nod
17
21
  let customDocSize = editorState.doc.nodeSize;
22
+ // @ts-ignore - Workaround for help-center local consumption
23
+
18
24
  editorState.doc.descendants(node => {
19
25
  var _node$attrs;
20
26
  if (((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionKey) === 'legacy-content') {
@@ -36,6 +42,8 @@ export const createPlugin = () => {
36
42
  };
37
43
  }
38
44
  },
45
+ // @ts-ignore - Workaround for help-center local consumption
46
+
39
47
  apply: (tr, currentPluginState) => {
40
48
  // Don't check the document size if we're already in limited mode.
41
49
  // We ALWAYS want to re-check the document size if we're replacing the document (e.g. live-to-live page navigation).
@@ -47,6 +55,8 @@ export const createPlugin = () => {
47
55
  // is stored in the attrs.
48
56
  // This is essentiall doc.nod
49
57
  let customDocSize = tr.doc.nodeSize;
58
+ // @ts-ignore - Workaround for help-center local consumption
59
+
50
60
  tr.doc.descendants(node => {
51
61
  var _node$attrs3;
52
62
  if (((_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.extensionKey) === 'legacy-content') {
@@ -8,16 +8,21 @@ export var limitedModePluginKey = new PluginKey('limitedModePlugin');
8
8
  export var createPlugin = function createPlugin() {
9
9
  return new SafePlugin({
10
10
  key: limitedModePluginKey,
11
+ // @ts-ignore - Workaround for help-center local consumption
12
+
11
13
  view: function view(_view) {
12
14
  return {};
13
15
  },
14
16
  state: {
17
+ // @ts-ignore - Workaround for help-center local consumption
15
18
  init: function init(config, editorState) {
16
19
  if (expVal('cc_editor_limited_mode_include_lcm', 'isEnabled', true)) {
17
20
  // calculates the size of the doc, where when there are legacy content macros, the content
18
21
  // is stored in the attrs.
19
22
  // This is essentiall doc.nod
20
23
  var customDocSize = editorState.doc.nodeSize;
24
+ // @ts-ignore - Workaround for help-center local consumption
25
+
21
26
  editorState.doc.descendants(function (node) {
22
27
  var _node$attrs;
23
28
  if (((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionKey) === 'legacy-content') {
@@ -39,6 +44,8 @@ export var createPlugin = function createPlugin() {
39
44
  };
40
45
  }
41
46
  },
47
+ // @ts-ignore - Workaround for help-center local consumption
48
+
42
49
  apply: function apply(tr, currentPluginState) {
43
50
  // Don't check the document size if we're already in limited mode.
44
51
  // We ALWAYS want to re-check the document size if we're replacing the document (e.g. live-to-live page navigation).
@@ -50,6 +57,8 @@ export var createPlugin = function createPlugin() {
50
57
  // is stored in the attrs.
51
58
  // This is essentiall doc.nod
52
59
  var customDocSize = tr.doc.nodeSize;
60
+ // @ts-ignore - Workaround for help-center local consumption
61
+
53
62
  tr.doc.descendants(function (node) {
54
63
  var _node$attrs3;
55
64
  if (((_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.extensionKey) === 'legacy-content') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-limited-mode",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "LimitedMode plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,14 +29,14 @@
29
29
  "atlaskit:src": "src/index.ts",
30
30
  "dependencies": {
31
31
  "@atlaskit/editor-prosemirror": "7.0.0",
32
- "@atlaskit/primitives": "^16.1.0",
33
- "@atlaskit/tmp-editor-statsig": "^13.23.0",
32
+ "@atlaskit/primitives": "^16.3.0",
33
+ "@atlaskit/tmp-editor-statsig": "^13.42.0",
34
34
  "@babel/runtime": "^7.0.0",
35
35
  "bind-event-listener": "^3.0.0",
36
36
  "react-intl-next": "npm:react-intl@^5.18.1"
37
37
  },
38
38
  "peerDependencies": {
39
- "@atlaskit/editor-common": "^110.20.0",
39
+ "@atlaskit/editor-common": "^110.34.0",
40
40
  "react": "^18.2.0"
41
41
  },
42
42
  "devDependencies": {
@@ -1,30 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.entry-points.post-office.json",
3
- "compilerOptions": {
4
- "target": "es5",
5
- "outDir": "../../../../../post-office/tsDist/@atlaskit__editor-plugin-limited-mode/app",
6
- "rootDir": "../",
7
- "composite": true
8
- },
9
- "include": [
10
- "../src/**/*.ts",
11
- "../src/**/*.tsx"
12
- ],
13
- "exclude": [
14
- "../src/**/__tests__/*",
15
- "../src/**/*.test.*",
16
- "../src/**/test.*",
17
- "../src/**/examples.*"
18
- ],
19
- "references": [
20
- {
21
- "path": "../../../design-system/primitives/afm-post-office/tsconfig.json"
22
- },
23
- {
24
- "path": "../../tmp-editor-statsig/afm-post-office/tsconfig.json"
25
- },
26
- {
27
- "path": "../../editor-common/afm-post-office/tsconfig.json"
28
- }
29
- ]
30
- }