@atlaskit/editor-plugin-placeholder 6.5.3 → 6.5.4

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-placeholder
2
2
 
3
+ ## 6.5.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
8
+ tsignores added for help-center local consumpton removed
9
+ - Updated dependencies
10
+
3
11
  ## 6.5.3
4
12
 
5
13
  ### Patch Changes
@@ -67,8 +67,6 @@ var cycleThroughPlaceholderPrompts = function cycleThroughPlaceholderPrompts(pla
67
67
  var displayedText = '';
68
68
  var animationTimeouts = [];
69
69
  var clearAllTimeouts = function clearAllTimeouts() {
70
- // @ts-ignore - Workaround for help-center local consumption
71
-
72
70
  animationTimeouts.forEach(function (timeoutId) {
73
71
  return clearTimeout(timeoutId);
74
72
  });
@@ -141,14 +139,10 @@ function createPlaceholderDecoration(editorState, placeholderText, placeholderPr
141
139
  if (docNode) {
142
140
  // Extract only the inline content from paragraphs, avoiding block-level elements
143
141
  // that can interfere with cursor rendering
144
- // @ts-ignore - Workaround for help-center local consumption
145
-
146
142
  docNode.children.forEach(function (node) {
147
143
  // For paragraph nodes, serialize their content (inline elements) directly
148
144
  // without the wrapping <p> tag
149
145
  if (node.type.name === 'paragraph') {
150
- // @ts-ignore - Workaround for help-center local consumption
151
-
152
146
  node.content.forEach(function (inlineNode) {
153
147
  var inlineDOM = serializer.serializeNode(inlineNode);
154
148
  placeholderNodeWithText.append(inlineDOM);
@@ -160,8 +154,6 @@ function createPlaceholderDecoration(editorState, placeholderText, placeholderPr
160
154
  }
161
155
  });
162
156
  var markElements = placeholderNodeWithText.querySelectorAll('[data-prosemirror-content-type="mark"]');
163
- // @ts-ignore - Workaround for help-center local consumption
164
-
165
157
  markElements.forEach(function (markEl) {
166
158
  if (markEl instanceof HTMLElement) {
167
159
  markEl.style.setProperty('color', "var(--ds-text-subtlest, #6B6E76)");
@@ -169,8 +161,6 @@ function createPlaceholderDecoration(editorState, placeholderText, placeholderPr
169
161
  });
170
162
  // Ensure all child elements don't block pointer events or cursor
171
163
  var allElements = placeholderNodeWithText.querySelectorAll('*');
172
- // @ts-ignore - Workaround for help-center local consumption
173
-
174
164
  allElements.forEach(function (el) {
175
165
  if (el instanceof HTMLElement) {
176
166
  el.style.pointerEvents = 'none';
@@ -429,8 +419,6 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
429
419
  var isDestroyed = false;
430
420
  var activeTypewriterTimeouts = [];
431
421
  var clearAllTypewriterTimeouts = function clearAllTypewriterTimeouts() {
432
- // @ts-ignore - Workaround for help-center local consumption
433
-
434
422
  activeTypewriterTimeouts.forEach(function (clearFn) {
435
423
  return clearFn();
436
424
  });
@@ -439,8 +427,6 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
439
427
  return new _safePlugin.SafePlugin({
440
428
  key: pluginKey,
441
429
  state: {
442
- // @ts-ignore - Workaround for help-center local consumption
443
-
444
430
  init: function init(_, state) {
445
431
  var _api$focus, _api$typeAhead;
446
432
  return createPlaceHolderStateFrom({
@@ -458,8 +444,6 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
458
444
  intl: intl
459
445
  });
460
446
  },
461
- // @ts-ignore - Workaround for help-center local consumption
462
-
463
447
  apply: function apply(tr, placeholderState, _oldEditorState, newEditorState) {
464
448
  var _api$focus2, _placeholderState$isP, _api$typeAhead2, _ref7, _meta$placeholderText, _ref8, _meta$placeholderProm, _meta$showOnEmptyPara;
465
449
  var meta = tr.getMeta(pluginKey);
@@ -506,7 +490,6 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
506
490
  }
507
491
  },
508
492
  props: {
509
- // @ts-ignore - Workaround for help-center local consumption
510
493
  decorations: function decorations(editorState) {
511
494
  var _api$composition, _api$showDiff;
512
495
  var _getPlaceholderState = getPlaceholderState(editorState),
@@ -532,7 +515,6 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
532
515
  return;
533
516
  }
534
517
  },
535
- // @ts-ignore - Workaround for help-center local consumption
536
518
  view: function view() {
537
519
  var timeoutId;
538
520
  function startEmptyParagraphTimeout(editorView) {
@@ -553,7 +535,6 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
553
535
  }
554
536
  }
555
537
  return {
556
- // @ts-ignore - Workaround for help-center local consumption
557
538
  update: function update(editorView, prevState) {
558
539
  if ((0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta_2') || (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_ga')) {
559
540
  var prevPluginState = getPlaceholderState(prevState);
@@ -577,7 +558,6 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
577
558
  }
578
559
  }
579
560
  },
580
- // @ts-ignore - Workaround for help-center local consumption
581
561
  destroy: function destroy() {
582
562
  clearAllTypewriterTimeouts();
583
563
  destroyEmptyParagraphTimeout();
@@ -51,8 +51,6 @@ const cycleThroughPlaceholderPrompts = (placeholderPrompts, activeTypewriterTime
51
51
  let displayedText = '';
52
52
  let animationTimeouts = [];
53
53
  const clearAllTimeouts = () => {
54
- // @ts-ignore - Workaround for help-center local consumption
55
-
56
54
  animationTimeouts.forEach(timeoutId => clearTimeout(timeoutId));
57
55
  animationTimeouts = [];
58
56
  };
@@ -120,14 +118,10 @@ export function createPlaceholderDecoration(editorState, placeholderText, placeh
120
118
  if (docNode) {
121
119
  // Extract only the inline content from paragraphs, avoiding block-level elements
122
120
  // that can interfere with cursor rendering
123
- // @ts-ignore - Workaround for help-center local consumption
124
-
125
121
  docNode.children.forEach(node => {
126
122
  // For paragraph nodes, serialize their content (inline elements) directly
127
123
  // without the wrapping <p> tag
128
124
  if (node.type.name === 'paragraph') {
129
- // @ts-ignore - Workaround for help-center local consumption
130
-
131
125
  node.content.forEach(inlineNode => {
132
126
  const inlineDOM = serializer.serializeNode(inlineNode);
133
127
  placeholderNodeWithText.append(inlineDOM);
@@ -139,8 +133,6 @@ export function createPlaceholderDecoration(editorState, placeholderText, placeh
139
133
  }
140
134
  });
141
135
  const markElements = placeholderNodeWithText.querySelectorAll('[data-prosemirror-content-type="mark"]');
142
- // @ts-ignore - Workaround for help-center local consumption
143
-
144
136
  markElements.forEach(markEl => {
145
137
  if (markEl instanceof HTMLElement) {
146
138
  markEl.style.setProperty('color', "var(--ds-text-subtlest, #6B6E76)");
@@ -148,8 +140,6 @@ export function createPlaceholderDecoration(editorState, placeholderText, placeh
148
140
  });
149
141
  // Ensure all child elements don't block pointer events or cursor
150
142
  const allElements = placeholderNodeWithText.querySelectorAll('*');
151
- // @ts-ignore - Workaround for help-center local consumption
152
-
153
143
  allElements.forEach(el => {
154
144
  if (el instanceof HTMLElement) {
155
145
  el.style.pointerEvents = 'none';
@@ -413,16 +403,12 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
413
403
  let isDestroyed = false;
414
404
  let activeTypewriterTimeouts = [];
415
405
  const clearAllTypewriterTimeouts = () => {
416
- // @ts-ignore - Workaround for help-center local consumption
417
-
418
406
  activeTypewriterTimeouts.forEach(clearFn => clearFn());
419
407
  activeTypewriterTimeouts = [];
420
408
  };
421
409
  return new SafePlugin({
422
410
  key: pluginKey,
423
411
  state: {
424
- // @ts-ignore - Workaround for help-center local consumption
425
-
426
412
  init: (_, state) => {
427
413
  var _api$focus, _api$focus$sharedStat, _api$typeAhead;
428
414
  return createPlaceHolderStateFrom({
@@ -440,8 +426,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
440
426
  intl
441
427
  });
442
428
  },
443
- // @ts-ignore - Workaround for help-center local consumption
444
-
445
429
  apply: (tr, placeholderState, _oldEditorState, newEditorState) => {
446
430
  var _api$focus2, _api$focus2$sharedSta, _placeholderState$isP, _api$typeAhead2, _ref, _meta$placeholderText, _ref2, _meta$placeholderProm, _meta$showOnEmptyPara;
447
431
  const meta = tr.getMeta(pluginKey);
@@ -489,8 +473,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
489
473
  }
490
474
  },
491
475
  props: {
492
- // @ts-ignore - Workaround for help-center local consumption
493
-
494
476
  decorations(editorState) {
495
477
  var _api$composition, _api$showDiff, _api$showDiff$sharedS;
496
478
  const {
@@ -517,8 +499,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
517
499
  return;
518
500
  }
519
501
  },
520
- // @ts-ignore - Workaround for help-center local consumption
521
-
522
502
  view() {
523
503
  let timeoutId;
524
504
  function startEmptyParagraphTimeout(editorView) {
@@ -539,8 +519,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
539
519
  }
540
520
  }
541
521
  return {
542
- // @ts-ignore - Workaround for help-center local consumption
543
-
544
522
  update(editorView, prevState) {
545
523
  if (fg('platform_editor_ai_aifc_patch_beta_2') || fg('platform_editor_ai_aifc_patch_ga')) {
546
524
  const prevPluginState = getPlaceholderState(prevState);
@@ -564,8 +542,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
564
542
  }
565
543
  }
566
544
  },
567
- // @ts-ignore - Workaround for help-center local consumption
568
-
569
545
  destroy() {
570
546
  clearAllTypewriterTimeouts();
571
547
  destroyEmptyParagraphTimeout();
@@ -57,8 +57,6 @@ var cycleThroughPlaceholderPrompts = function cycleThroughPlaceholderPrompts(pla
57
57
  var displayedText = '';
58
58
  var animationTimeouts = [];
59
59
  var clearAllTimeouts = function clearAllTimeouts() {
60
- // @ts-ignore - Workaround for help-center local consumption
61
-
62
60
  animationTimeouts.forEach(function (timeoutId) {
63
61
  return clearTimeout(timeoutId);
64
62
  });
@@ -131,14 +129,10 @@ export function createPlaceholderDecoration(editorState, placeholderText, placeh
131
129
  if (docNode) {
132
130
  // Extract only the inline content from paragraphs, avoiding block-level elements
133
131
  // that can interfere with cursor rendering
134
- // @ts-ignore - Workaround for help-center local consumption
135
-
136
132
  docNode.children.forEach(function (node) {
137
133
  // For paragraph nodes, serialize their content (inline elements) directly
138
134
  // without the wrapping <p> tag
139
135
  if (node.type.name === 'paragraph') {
140
- // @ts-ignore - Workaround for help-center local consumption
141
-
142
136
  node.content.forEach(function (inlineNode) {
143
137
  var inlineDOM = serializer.serializeNode(inlineNode);
144
138
  placeholderNodeWithText.append(inlineDOM);
@@ -150,8 +144,6 @@ export function createPlaceholderDecoration(editorState, placeholderText, placeh
150
144
  }
151
145
  });
152
146
  var markElements = placeholderNodeWithText.querySelectorAll('[data-prosemirror-content-type="mark"]');
153
- // @ts-ignore - Workaround for help-center local consumption
154
-
155
147
  markElements.forEach(function (markEl) {
156
148
  if (markEl instanceof HTMLElement) {
157
149
  markEl.style.setProperty('color', "var(--ds-text-subtlest, #6B6E76)");
@@ -159,8 +151,6 @@ export function createPlaceholderDecoration(editorState, placeholderText, placeh
159
151
  });
160
152
  // Ensure all child elements don't block pointer events or cursor
161
153
  var allElements = placeholderNodeWithText.querySelectorAll('*');
162
- // @ts-ignore - Workaround for help-center local consumption
163
-
164
154
  allElements.forEach(function (el) {
165
155
  if (el instanceof HTMLElement) {
166
156
  el.style.pointerEvents = 'none';
@@ -419,8 +409,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
419
409
  var isDestroyed = false;
420
410
  var activeTypewriterTimeouts = [];
421
411
  var clearAllTypewriterTimeouts = function clearAllTypewriterTimeouts() {
422
- // @ts-ignore - Workaround for help-center local consumption
423
-
424
412
  activeTypewriterTimeouts.forEach(function (clearFn) {
425
413
  return clearFn();
426
414
  });
@@ -429,8 +417,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
429
417
  return new SafePlugin({
430
418
  key: pluginKey,
431
419
  state: {
432
- // @ts-ignore - Workaround for help-center local consumption
433
-
434
420
  init: function init(_, state) {
435
421
  var _api$focus, _api$typeAhead;
436
422
  return createPlaceHolderStateFrom({
@@ -448,8 +434,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
448
434
  intl: intl
449
435
  });
450
436
  },
451
- // @ts-ignore - Workaround for help-center local consumption
452
-
453
437
  apply: function apply(tr, placeholderState, _oldEditorState, newEditorState) {
454
438
  var _api$focus2, _placeholderState$isP, _api$typeAhead2, _ref7, _meta$placeholderText, _ref8, _meta$placeholderProm, _meta$showOnEmptyPara;
455
439
  var meta = tr.getMeta(pluginKey);
@@ -496,7 +480,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
496
480
  }
497
481
  },
498
482
  props: {
499
- // @ts-ignore - Workaround for help-center local consumption
500
483
  decorations: function decorations(editorState) {
501
484
  var _api$composition, _api$showDiff;
502
485
  var _getPlaceholderState = getPlaceholderState(editorState),
@@ -522,7 +505,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
522
505
  return;
523
506
  }
524
507
  },
525
- // @ts-ignore - Workaround for help-center local consumption
526
508
  view: function view() {
527
509
  var timeoutId;
528
510
  function startEmptyParagraphTimeout(editorView) {
@@ -543,7 +525,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
543
525
  }
544
526
  }
545
527
  return {
546
- // @ts-ignore - Workaround for help-center local consumption
547
528
  update: function update(editorView, prevState) {
548
529
  if (fg('platform_editor_ai_aifc_patch_beta_2') || fg('platform_editor_ai_aifc_patch_ga')) {
549
530
  var prevPluginState = getPlaceholderState(prevState);
@@ -567,7 +548,6 @@ export function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderTex
567
548
  }
568
549
  }
569
550
  },
570
- // @ts-ignore - Workaround for help-center local consumption
571
551
  destroy: function destroy() {
572
552
  clearAllTypewriterTimeouts();
573
553
  destroyEmptyParagraphTimeout();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-placeholder",
3
- "version": "6.5.3",
3
+ "version": "6.5.4",
4
4
  "description": "Placeholder plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/editor-plugin-type-ahead": "^6.5.0",
35
35
  "@atlaskit/editor-prosemirror": "7.0.0",
36
36
  "@atlaskit/platform-feature-flags": "^1.1.0",
37
- "@atlaskit/tmp-editor-statsig": "^14.1.0",
37
+ "@atlaskit/tmp-editor-statsig": "^14.2.0",
38
38
  "@atlaskit/tokens": "^8.4.0",
39
39
  "@babel/runtime": "^7.0.0"
40
40
  },