@atlaskit/editor-plugin-placeholder 3.2.3 → 4.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
+ ## 4.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5a18ea57e4ddc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5a18ea57e4ddc) -
8
+ [ux] Fix cursor size when cycling through placeholderPrompts
9
+ - Updated dependencies
10
+
11
+ ## 4.0.0
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 3.2.3
4
18
 
5
19
  ### Patch Changes
@@ -56,12 +56,13 @@ var createTypewriterElement = function createTypewriterElement(placeholderPrompt
56
56
  }
57
57
  };
58
58
  var _eraseLastCharacter = function eraseLastCharacter() {
59
- if (displayedText.length > 0) {
59
+ if (displayedText.length > 1) {
60
60
  displayedText = displayedText.substring(0, displayedText.length - 1);
61
61
  typewriterElement.textContent = displayedText;
62
62
  scheduleTimeout(_eraseLastCharacter, TYPEWRITER_ERASE_DELAY);
63
63
  } else {
64
- // Move to next prompt. Modulo lets us cycle infinitely
64
+ displayedText = ' ';
65
+ typewriterElement.textContent = displayedText;
65
66
  currentPromptIndex = (currentPromptIndex + 1) % placeholderPrompts.length;
66
67
  scheduleTimeout(_startAnimationCycle, TYPEWRITER_CYCLE_DELAY);
67
68
  }
@@ -46,12 +46,13 @@ const createTypewriterElement = (placeholderPrompts, activeTypewriterTimeouts) =
46
46
  }
47
47
  };
48
48
  const eraseLastCharacter = () => {
49
- if (displayedText.length > 0) {
49
+ if (displayedText.length > 1) {
50
50
  displayedText = displayedText.substring(0, displayedText.length - 1);
51
51
  typewriterElement.textContent = displayedText;
52
52
  scheduleTimeout(eraseLastCharacter, TYPEWRITER_ERASE_DELAY);
53
53
  } else {
54
- // Move to next prompt. Modulo lets us cycle infinitely
54
+ displayedText = ' ';
55
+ typewriterElement.textContent = displayedText;
55
56
  currentPromptIndex = (currentPromptIndex + 1) % placeholderPrompts.length;
56
57
  scheduleTimeout(startAnimationCycle, TYPEWRITER_CYCLE_DELAY);
57
58
  }
@@ -48,12 +48,13 @@ var createTypewriterElement = function createTypewriterElement(placeholderPrompt
48
48
  }
49
49
  };
50
50
  var _eraseLastCharacter = function eraseLastCharacter() {
51
- if (displayedText.length > 0) {
51
+ if (displayedText.length > 1) {
52
52
  displayedText = displayedText.substring(0, displayedText.length - 1);
53
53
  typewriterElement.textContent = displayedText;
54
54
  scheduleTimeout(_eraseLastCharacter, TYPEWRITER_ERASE_DELAY);
55
55
  } else {
56
- // Move to next prompt. Modulo lets us cycle infinitely
56
+ displayedText = ' ';
57
+ typewriterElement.textContent = displayedText;
57
58
  currentPromptIndex = (currentPromptIndex + 1) % placeholderPrompts.length;
58
59
  scheduleTimeout(_startAnimationCycle, TYPEWRITER_CYCLE_DELAY);
59
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-placeholder",
3
- "version": "3.2.3",
3
+ "version": "4.0.1",
4
4
  "description": "Placeholder plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -27,17 +27,17 @@
27
27
  "sideEffects": false,
28
28
  "atlaskit:src": "src/index.ts",
29
29
  "dependencies": {
30
- "@atlaskit/editor-plugin-composition": "^2.0.0",
31
- "@atlaskit/editor-plugin-focus": "^2.0.0",
32
- "@atlaskit/editor-plugin-show-diff": "^0.2.0",
33
- "@atlaskit/editor-plugin-type-ahead": "^3.1.0",
30
+ "@atlaskit/editor-plugin-composition": "^3.0.0",
31
+ "@atlaskit/editor-plugin-focus": "^3.0.0",
32
+ "@atlaskit/editor-plugin-show-diff": "^1.0.0",
33
+ "@atlaskit/editor-plugin-type-ahead": "^4.0.0",
34
34
  "@atlaskit/editor-prosemirror": "7.0.0",
35
35
  "@atlaskit/platform-feature-flags": "^1.1.0",
36
- "@atlaskit/tmp-editor-statsig": "^11.10.0",
36
+ "@atlaskit/tmp-editor-statsig": "^12.2.0",
37
37
  "@babel/runtime": "^7.0.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "@atlaskit/editor-common": "^107.33.0",
40
+ "@atlaskit/editor-common": "^108.1.0",
41
41
  "react": "^18.2.0",
42
42
  "react-dom": "^18.2.0",
43
43
  "react-intl-next": "npm:react-intl@^5.18.1"