@atlaskit/editor-plugin-placeholder 16.0.7 → 16.0.8
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 +6 -0
- package/dist/cjs/pm-plugins/decorations.js +2 -2
- package/dist/cjs/pm-plugins/utils.js +2 -2
- package/dist/es2019/pm-plugins/decorations.js +1 -1
- package/dist/es2019/pm-plugins/utils.js +1 -1
- package/dist/esm/pm-plugins/decorations.js +1 -1
- package/dist/esm/pm-plugins/utils.js +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,7 @@ var _processRawValue = require("@atlaskit/editor-common/process-raw-value");
|
|
|
9
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
10
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
11
11
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
12
|
-
var
|
|
12
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
13
13
|
var _animation = require("./animation");
|
|
14
14
|
var _constants = require("./constants");
|
|
15
15
|
function createPlaceholderDecoration(editorState, placeholderText, placeholderPrompts, activeTypewriterTimeouts) {
|
|
@@ -90,7 +90,7 @@ function createPlaceholderDecoration(editorState, placeholderText, placeholderPr
|
|
|
90
90
|
|
|
91
91
|
// only truncate text for nested nodes, otherwise applying 'overflow: hidden;' to top level nodes
|
|
92
92
|
// creates issues with quick insert button
|
|
93
|
-
if (isTargetNested && (0,
|
|
93
|
+
if (isTargetNested && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
94
94
|
placeholderDecoration.classList.add('placeholder-decoration-hide-overflow');
|
|
95
95
|
}
|
|
96
96
|
if (placeholderADF && browser.chrome) {
|
|
@@ -15,7 +15,7 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
15
15
|
var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
|
|
16
16
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
17
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
|
-
var
|
|
18
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
19
19
|
var _placeholderPlugin = require("../placeholderPlugin");
|
|
20
20
|
var _adfBuilders = require("./adf-builders");
|
|
21
21
|
var _constants = require("./constants");
|
|
@@ -138,7 +138,7 @@ function createPlaceHolderStateFrom(_ref3) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
if (isEditorFocused && (0,
|
|
141
|
+
if (isEditorFocused && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
142
142
|
var _parentNode$type, _parentNode$firstChil, _parentNode$firstChil2;
|
|
143
143
|
var _editorState$selectio2 = editorState.selection,
|
|
144
144
|
$from = _editorState$selectio2.$from,
|
|
@@ -3,7 +3,7 @@ import { processRawValue } from '@atlaskit/editor-common/process-raw-value';
|
|
|
3
3
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { cycleThroughPlaceholderPrompts } from './animation';
|
|
8
8
|
import { placeholderTestId } from './constants';
|
|
9
9
|
export function createPlaceholderDecoration(editorState, placeholderText, placeholderPrompts, activeTypewriterTimeouts, pos = 1, initialDelayWhenUserTypedAndDeleted = 0, placeholderADF, showOnEmptyParagraph) {
|
|
@@ -3,7 +3,7 @@ import { bracketTyped, hasDocAsParent, isEmptyDocument, isEmptyParagraph } from
|
|
|
3
3
|
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
4
4
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { pluginKey } from '../placeholderPlugin';
|
|
8
8
|
import { createLongEmptyNodePlaceholderADF, createShortEmptyNodePlaceholderADF } from './adf-builders';
|
|
9
9
|
import { nodeTypesWithLongPlaceholderText, nodeTypesWithShortPlaceholderText, nodeTypesWithSyncBlockPlaceholderText } from './constants';
|
|
@@ -3,7 +3,7 @@ import { processRawValue } from '@atlaskit/editor-common/process-raw-value';
|
|
|
3
3
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { cycleThroughPlaceholderPrompts } from './animation';
|
|
8
8
|
import { placeholderTestId } from './constants';
|
|
9
9
|
export function createPlaceholderDecoration(editorState, placeholderText, placeholderPrompts, activeTypewriterTimeouts) {
|
|
@@ -6,7 +6,7 @@ import { bracketTyped, hasDocAsParent, isEmptyDocument, isEmptyParagraph } from
|
|
|
6
6
|
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
7
7
|
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
10
|
import { pluginKey } from '../placeholderPlugin';
|
|
11
11
|
import { createLongEmptyNodePlaceholderADF, createShortEmptyNodePlaceholderADF } from './adf-builders';
|
|
12
12
|
import { nodeTypesWithLongPlaceholderText, nodeTypesWithShortPlaceholderText, nodeTypesWithSyncBlockPlaceholderText } from './constants';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.8",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"atlaskit:src": "src/index.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@atlaskit/adf-schema": "^57.2.0",
|
|
22
23
|
"@atlaskit/adf-utils": "^20.7.0",
|
|
23
24
|
"@atlaskit/css": "^1.1.0",
|
|
24
25
|
"@atlaskit/editor-plugin-composition": "^15.0.0",
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
30
31
|
"@atlaskit/primitives": "^22.4.0",
|
|
31
32
|
"@atlaskit/spinner": "^20.3.0",
|
|
32
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
33
34
|
"@atlaskit/tokens": "^16.9.0",
|
|
34
35
|
"@babel/runtime": "^7.0.0"
|
|
35
36
|
},
|