@atlaskit/editor-plugin-placeholder 22.1.8 → 23.0.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,19 @@
1
1
  # @atlaskit/editor-plugin-placeholder
2
2
 
3
+ ## 23.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 23.0.0
10
+
11
+ ### Patch Changes
12
+
13
+ - [`55e90d4321606`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55e90d4321606) -
14
+ Clean up experiment platform_editor_sync_block_activation.
15
+ - Updated dependencies
16
+
3
17
  ## 22.1.8
4
18
 
5
19
  ### Patch Changes
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.placeholderTestId = exports.nodeTypesWithSyncBlockPlaceholderText = exports.nodeTypesWithShortPlaceholderText = exports.nodeTypesWithLongPlaceholderText = exports.TYPEWRITER_TYPE_DELAY = exports.TYPEWRITER_TYPED_AND_DELETED_DELAY = exports.TYPEWRITER_PAUSE_BEFORE_ERASE = exports.TYPEWRITER_ERASE_DELAY = exports.TYPEWRITER_CYCLE_DELAY = void 0;
6
+ exports.placeholderTestId = exports.nodeTypesWithShortPlaceholderText = exports.nodeTypesWithLongPlaceholderText = exports.TYPEWRITER_TYPE_DELAY = exports.TYPEWRITER_TYPED_AND_DELETED_DELAY = exports.TYPEWRITER_PAUSE_BEFORE_ERASE = exports.TYPEWRITER_ERASE_DELAY = exports.TYPEWRITER_CYCLE_DELAY = void 0;
7
7
  var placeholderTestId = exports.placeholderTestId = 'placeholder-test-id';
8
8
 
9
9
  // Typewriter animation timing constants
@@ -14,5 +14,4 @@ var TYPEWRITER_CYCLE_DELAY = exports.TYPEWRITER_CYCLE_DELAY = 500; // Delay befo
14
14
  var TYPEWRITER_TYPED_AND_DELETED_DELAY = exports.TYPEWRITER_TYPED_AND_DELETED_DELAY = 1500; // Delay before starting animation after user typed and deleted
15
15
 
16
16
  var nodeTypesWithLongPlaceholderText = exports.nodeTypesWithLongPlaceholderText = ['expand', 'panel'];
17
- var nodeTypesWithShortPlaceholderText = exports.nodeTypesWithShortPlaceholderText = ['tableCell', 'tableHeader'];
18
- var nodeTypesWithSyncBlockPlaceholderText = exports.nodeTypesWithSyncBlockPlaceholderText = ['bodiedSyncBlock'];
17
+ var nodeTypesWithShortPlaceholderText = exports.nodeTypesWithShortPlaceholderText = ['tableCell', 'tableHeader'];
@@ -10,7 +10,6 @@ exports.emptyPlaceholder = void 0;
10
10
  exports.getPlaceholderState = getPlaceholderState;
11
11
  exports.setPlaceHolderState = setPlaceHolderState;
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
- var _messages = require("@atlaskit/editor-common/messages");
14
13
  var _utils = require("@atlaskit/editor-common/utils");
15
14
  var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
16
15
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
@@ -199,15 +198,6 @@ function createPlaceHolderStateFrom(_ref3) {
199
198
  userHadTyped: userHadTyped
200
199
  });
201
200
  }
202
- if (_constants.nodeTypesWithSyncBlockPlaceholderText.includes(parentType) && isEmptyNode && !(0, _expValEquals.expValEquals)('platform_editor_sync_block_activation', 'isEnabled', true)) {
203
- return setPlaceHolderState({
204
- placeholderText: intl.formatMessage(_messages.placeholderTextMessages.sourceSyncBlockPlaceholderText),
205
- pos: $from.pos,
206
- placeholderPrompts: placeholderPrompts,
207
- typedAndDeleted: typedAndDeleted,
208
- userHadTyped: userHadTyped
209
- });
210
- }
211
201
  return emptyPlaceholder({
212
202
  placeholderText: defaultPlaceholderText,
213
203
  placeholderPrompts: placeholderPrompts,
@@ -8,5 +8,4 @@ export const TYPEWRITER_CYCLE_DELAY = 500; // Delay before starting next cycle
8
8
  export const TYPEWRITER_TYPED_AND_DELETED_DELAY = 1500; // Delay before starting animation after user typed and deleted
9
9
 
10
10
  export const nodeTypesWithLongPlaceholderText = ['expand', 'panel'];
11
- export const nodeTypesWithShortPlaceholderText = ['tableCell', 'tableHeader'];
12
- export const nodeTypesWithSyncBlockPlaceholderText = ['bodiedSyncBlock'];
11
+ export const nodeTypesWithShortPlaceholderText = ['tableCell', 'tableHeader'];
@@ -1,4 +1,3 @@
1
- import { placeholderTextMessages as messages } from '@atlaskit/editor-common/messages';
2
1
  import { bracketTyped, hasDocAsParent, isEmptyDocument, isEmptyParagraph } from '@atlaskit/editor-common/utils';
3
2
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
4
3
  import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
@@ -6,7 +5,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment
6
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
6
  import { pluginKey } from '../placeholderPlugin';
8
7
  import { createLongEmptyNodePlaceholderADF, createShortEmptyNodePlaceholderADF } from './adf-builders';
9
- import { nodeTypesWithLongPlaceholderText, nodeTypesWithShortPlaceholderText, nodeTypesWithSyncBlockPlaceholderText } from './constants';
8
+ import { nodeTypesWithLongPlaceholderText, nodeTypesWithShortPlaceholderText } from './constants';
10
9
  export function getPlaceholderState(editorState) {
11
10
  return pluginKey.getState(editorState);
12
11
  }
@@ -187,15 +186,6 @@ export function createPlaceHolderStateFrom({
187
186
  userHadTyped
188
187
  });
189
188
  }
190
- if (nodeTypesWithSyncBlockPlaceholderText.includes(parentType) && isEmptyNode && !expValEquals('platform_editor_sync_block_activation', 'isEnabled', true)) {
191
- return setPlaceHolderState({
192
- placeholderText: intl.formatMessage(messages.sourceSyncBlockPlaceholderText),
193
- pos: $from.pos,
194
- placeholderPrompts,
195
- typedAndDeleted,
196
- userHadTyped
197
- });
198
- }
199
189
  return emptyPlaceholder({
200
190
  placeholderText: defaultPlaceholderText,
201
191
  placeholderPrompts,
@@ -8,5 +8,4 @@ export var TYPEWRITER_CYCLE_DELAY = 500; // Delay before starting next cycle
8
8
  export var TYPEWRITER_TYPED_AND_DELETED_DELAY = 1500; // Delay before starting animation after user typed and deleted
9
9
 
10
10
  export var nodeTypesWithLongPlaceholderText = ['expand', 'panel'];
11
- export var nodeTypesWithShortPlaceholderText = ['tableCell', 'tableHeader'];
12
- export var nodeTypesWithSyncBlockPlaceholderText = ['bodiedSyncBlock'];
11
+ export var nodeTypesWithShortPlaceholderText = ['tableCell', 'tableHeader'];
@@ -1,7 +1,6 @@
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 { placeholderTextMessages as messages } from '@atlaskit/editor-common/messages';
5
4
  import { bracketTyped, hasDocAsParent, isEmptyDocument, isEmptyParagraph } from '@atlaskit/editor-common/utils';
6
5
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
7
6
  import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
@@ -9,7 +8,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment
9
8
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
9
  import { pluginKey } from '../placeholderPlugin';
11
10
  import { createLongEmptyNodePlaceholderADF, createShortEmptyNodePlaceholderADF } from './adf-builders';
12
- import { nodeTypesWithLongPlaceholderText, nodeTypesWithShortPlaceholderText, nodeTypesWithSyncBlockPlaceholderText } from './constants';
11
+ import { nodeTypesWithLongPlaceholderText, nodeTypesWithShortPlaceholderText } from './constants';
13
12
  export function getPlaceholderState(editorState) {
14
13
  return pluginKey.getState(editorState);
15
14
  }
@@ -188,15 +187,6 @@ export function createPlaceHolderStateFrom(_ref3) {
188
187
  userHadTyped: userHadTyped
189
188
  });
190
189
  }
191
- if (nodeTypesWithSyncBlockPlaceholderText.includes(parentType) && isEmptyNode && !expValEquals('platform_editor_sync_block_activation', 'isEnabled', true)) {
192
- return setPlaceHolderState({
193
- placeholderText: intl.formatMessage(messages.sourceSyncBlockPlaceholderText),
194
- pos: $from.pos,
195
- placeholderPrompts: placeholderPrompts,
196
- typedAndDeleted: typedAndDeleted,
197
- userHadTyped: userHadTyped
198
- });
199
- }
200
190
  return emptyPlaceholder({
201
191
  placeholderText: defaultPlaceholderText,
202
192
  placeholderPrompts: placeholderPrompts,
@@ -6,4 +6,3 @@ export declare const TYPEWRITER_CYCLE_DELAY = 500;
6
6
  export declare const TYPEWRITER_TYPED_AND_DELETED_DELAY = 1500;
7
7
  export declare const nodeTypesWithLongPlaceholderText: string[];
8
8
  export declare const nodeTypesWithShortPlaceholderText: string[];
9
- export declare const nodeTypesWithSyncBlockPlaceholderText: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-placeholder",
3
- "version": "22.1.8",
3
+ "version": "23.0.1",
4
4
  "description": "Placeholder plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -22,21 +22,21 @@
22
22
  "@atlaskit/adf-schema": "^57.6.0",
23
23
  "@atlaskit/adf-utils": "^20.9.0",
24
24
  "@atlaskit/css": "^1.1.0",
25
- "@atlaskit/editor-plugin-collab-edit": "^23.0.0",
26
- "@atlaskit/editor-plugin-composition": "^21.0.0",
27
- "@atlaskit/editor-plugin-focus": "^21.0.0",
28
- "@atlaskit/editor-plugin-show-diff": "^20.0.0",
29
- "@atlaskit/editor-plugin-type-ahead": "^23.0.0",
25
+ "@atlaskit/editor-plugin-collab-edit": "^24.0.0",
26
+ "@atlaskit/editor-plugin-composition": "^22.0.0",
27
+ "@atlaskit/editor-plugin-focus": "^22.0.0",
28
+ "@atlaskit/editor-plugin-show-diff": "^21.0.0",
29
+ "@atlaskit/editor-plugin-type-ahead": "^24.0.0",
30
30
  "@atlaskit/editor-prosemirror": "^9.0.0",
31
31
  "@atlaskit/platform-feature-flags": "^2.2.0",
32
32
  "@atlaskit/primitives": "^22.5.0",
33
33
  "@atlaskit/spinner": "^20.4.0",
34
- "@atlaskit/tmp-editor-statsig": "^218.0.0",
34
+ "@atlaskit/tmp-editor-statsig": "^220.0.0",
35
35
  "@atlaskit/tokens": "^20.1.0",
36
36
  "@babel/runtime": "^7.0.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@atlaskit/editor-common": "^126.4.0",
39
+ "@atlaskit/editor-common": "^127.2.0",
40
40
  "react": "^18.2.0 || ^19.2.0",
41
41
  "react-dom": "^18.2.0 || ^19.2.0",
42
42
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"