@atlaskit/editor-plugin-placeholder 7.2.19 → 7.3.0
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 +12 -0
- package/dist/cjs/placeholderPlugin.js +1 -1
- package/dist/cjs/pm-plugins/main.js +3 -2
- package/dist/es2019/placeholderPlugin.js +1 -1
- package/dist/es2019/pm-plugins/main.js +3 -2
- package/dist/esm/placeholderPlugin.js +1 -1
- package/dist/esm/pm-plugins/main.js +3 -2
- package/dist/types/placeholderPluginType.d.ts +1 -0
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/placeholderPluginType.d.ts +1 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder
|
|
2
2
|
|
|
3
|
+
## 7.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`0a0a5831dfc2d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a0a5831dfc2d) -
|
|
8
|
+
[ux] Adds isPlaceholderHidden param to placeholder plugin init. Removes isEmbedded option from
|
|
9
|
+
placeholder plugin, and removes cwr_blank_object_experiment editor experiment override
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 7.2.19
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -60,7 +60,7 @@ var placeholderPlugin = exports.placeholderPlugin = function placeholderPlugin(_
|
|
|
60
60
|
name: 'placeholder',
|
|
61
61
|
plugin: function plugin(_ref5) {
|
|
62
62
|
var getIntl = _ref5.getIntl;
|
|
63
|
-
return (0, _main.default)(getIntl(), options && options.placeholder, options && options.placeholderBracketHint, options && options.emptyLinePlaceholder, options && options.placeholderPrompts, options === null || options === void 0 ? void 0 : options.withEmptyParagraph, options && options.placeholderADF, api);
|
|
63
|
+
return (0, _main.default)(getIntl(), options && options.placeholder, options && options.placeholderBracketHint, options && options.emptyLinePlaceholder, options && options.placeholderPrompts, options === null || options === void 0 ? void 0 : options.withEmptyParagraph, options === null || options === void 0 ? void 0 : options.isPlaceholderHidden, options && options.placeholderADF, api);
|
|
64
64
|
}
|
|
65
65
|
}];
|
|
66
66
|
},
|
|
@@ -11,7 +11,7 @@ var _placeholderPlugin = require("../placeholderPlugin");
|
|
|
11
11
|
var _constants = require("./constants");
|
|
12
12
|
var _decorations = require("./decorations");
|
|
13
13
|
var _utils = require("./utils");
|
|
14
|
-
function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, emptyLinePlaceholder, placeholderPrompts, withEmptyParagraph, placeholderADF, api) {
|
|
14
|
+
function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, emptyLinePlaceholder, placeholderPrompts, withEmptyParagraph, initialIsPlaceholderHidden, placeholderADF, api) {
|
|
15
15
|
if (!defaultPlaceholderText && !placeholderPrompts && !bracketPlaceholderText && !placeholderADF) {
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
@@ -41,7 +41,8 @@ function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, empt
|
|
|
41
41
|
typedAndDeleted: false,
|
|
42
42
|
userHadTyped: false,
|
|
43
43
|
intl: intl,
|
|
44
|
-
withEmptyParagraph: withEmptyParagraph
|
|
44
|
+
withEmptyParagraph: withEmptyParagraph,
|
|
45
|
+
isPlaceholderHidden: initialIsPlaceholderHidden
|
|
45
46
|
});
|
|
46
47
|
},
|
|
47
48
|
apply: function apply(tr, placeholderState, _oldEditorState, newEditorState) {
|
|
@@ -51,7 +51,7 @@ export const placeholderPlugin = ({
|
|
|
51
51
|
name: 'placeholder',
|
|
52
52
|
plugin: ({
|
|
53
53
|
getIntl
|
|
54
|
-
}) => createPlugin(getIntl(), options && options.placeholder, options && options.placeholderBracketHint, options && options.emptyLinePlaceholder, options && options.placeholderPrompts, options === null || options === void 0 ? void 0 : options.withEmptyParagraph, options && options.placeholderADF, api)
|
|
54
|
+
}) => createPlugin(getIntl(), options && options.placeholder, options && options.placeholderBracketHint, options && options.emptyLinePlaceholder, options && options.placeholderPrompts, options === null || options === void 0 ? void 0 : options.withEmptyParagraph, options === null || options === void 0 ? void 0 : options.isPlaceholderHidden, options && options.placeholderADF, api)
|
|
55
55
|
}];
|
|
56
56
|
},
|
|
57
57
|
contentComponent: expValEquals('confluence_load_editor_title_on_transition', 'contentPlaceholder', true) ? params => {
|
|
@@ -5,7 +5,7 @@ import { pluginKey, EMPTY_PARAGRAPH_TIMEOUT_DELAY } from '../placeholderPlugin';
|
|
|
5
5
|
import { TYPEWRITER_TYPED_AND_DELETED_DELAY } from './constants';
|
|
6
6
|
import { createPlaceholderDecoration } from './decorations';
|
|
7
7
|
import { calculateUserInteractionState, createPlaceHolderStateFrom, getPlaceholderState } from './utils';
|
|
8
|
-
export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, emptyLinePlaceholder, placeholderPrompts, withEmptyParagraph, placeholderADF, api) {
|
|
8
|
+
export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, emptyLinePlaceholder, placeholderPrompts, withEmptyParagraph, initialIsPlaceholderHidden, placeholderADF, api) {
|
|
9
9
|
if (!defaultPlaceholderText && !placeholderPrompts && !bracketPlaceholderText && !placeholderADF) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
@@ -33,7 +33,8 @@ export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceh
|
|
|
33
33
|
typedAndDeleted: false,
|
|
34
34
|
userHadTyped: false,
|
|
35
35
|
intl,
|
|
36
|
-
withEmptyParagraph
|
|
36
|
+
withEmptyParagraph,
|
|
37
|
+
isPlaceholderHidden: initialIsPlaceholderHidden
|
|
37
38
|
});
|
|
38
39
|
},
|
|
39
40
|
apply: (tr, placeholderState, _oldEditorState, newEditorState) => {
|
|
@@ -53,7 +53,7 @@ export var placeholderPlugin = function placeholderPlugin(_ref) {
|
|
|
53
53
|
name: 'placeholder',
|
|
54
54
|
plugin: function plugin(_ref5) {
|
|
55
55
|
var getIntl = _ref5.getIntl;
|
|
56
|
-
return createPlugin(getIntl(), options && options.placeholder, options && options.placeholderBracketHint, options && options.emptyLinePlaceholder, options && options.placeholderPrompts, options === null || options === void 0 ? void 0 : options.withEmptyParagraph, options && options.placeholderADF, api);
|
|
56
|
+
return createPlugin(getIntl(), options && options.placeholder, options && options.placeholderBracketHint, options && options.emptyLinePlaceholder, options && options.placeholderPrompts, options === null || options === void 0 ? void 0 : options.withEmptyParagraph, options === null || options === void 0 ? void 0 : options.isPlaceholderHidden, options && options.placeholderADF, api);
|
|
57
57
|
}
|
|
58
58
|
}];
|
|
59
59
|
},
|
|
@@ -5,7 +5,7 @@ import { pluginKey, EMPTY_PARAGRAPH_TIMEOUT_DELAY } from '../placeholderPlugin';
|
|
|
5
5
|
import { TYPEWRITER_TYPED_AND_DELETED_DELAY } from './constants';
|
|
6
6
|
import { createPlaceholderDecoration } from './decorations';
|
|
7
7
|
import { calculateUserInteractionState, createPlaceHolderStateFrom, getPlaceholderState } from './utils';
|
|
8
|
-
export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, emptyLinePlaceholder, placeholderPrompts, withEmptyParagraph, placeholderADF, api) {
|
|
8
|
+
export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceholderText, emptyLinePlaceholder, placeholderPrompts, withEmptyParagraph, initialIsPlaceholderHidden, placeholderADF, api) {
|
|
9
9
|
if (!defaultPlaceholderText && !placeholderPrompts && !bracketPlaceholderText && !placeholderADF) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
@@ -35,7 +35,8 @@ export default function createPlugin(intl, defaultPlaceholderText, bracketPlaceh
|
|
|
35
35
|
typedAndDeleted: false,
|
|
36
36
|
userHadTyped: false,
|
|
37
37
|
intl: intl,
|
|
38
|
-
withEmptyParagraph: withEmptyParagraph
|
|
38
|
+
withEmptyParagraph: withEmptyParagraph,
|
|
39
|
+
isPlaceholderHidden: initialIsPlaceholderHidden
|
|
39
40
|
});
|
|
40
41
|
},
|
|
41
42
|
apply: function apply(tr, placeholderState, _oldEditorState, newEditorState) {
|
|
@@ -7,6 +7,7 @@ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
|
7
7
|
export interface PlaceholderPluginOptions {
|
|
8
8
|
emptyLinePlaceholder?: string;
|
|
9
9
|
enableLoadingSpinner?: boolean;
|
|
10
|
+
isPlaceholderHidden?: boolean;
|
|
10
11
|
placeholder?: string;
|
|
11
12
|
placeholderADF?: DocNode;
|
|
12
13
|
placeholderBracketHint?: string;
|
|
@@ -3,4 +3,4 @@ import type { DocNode } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { PlaceholderPlugin } from '../placeholderPluginType';
|
|
6
|
-
export default function createPlugin(intl: IntlShape, defaultPlaceholderText?: string, bracketPlaceholderText?: string, emptyLinePlaceholder?: string, placeholderPrompts?: string[], withEmptyParagraph?: boolean, placeholderADF?: DocNode, api?: ExtractInjectionAPI<PlaceholderPlugin>): SafePlugin | undefined;
|
|
6
|
+
export default function createPlugin(intl: IntlShape, defaultPlaceholderText?: string, bracketPlaceholderText?: string, emptyLinePlaceholder?: string, placeholderPrompts?: string[], withEmptyParagraph?: boolean, initialIsPlaceholderHidden?: boolean, placeholderADF?: DocNode, api?: ExtractInjectionAPI<PlaceholderPlugin>): SafePlugin | undefined;
|
|
@@ -7,6 +7,7 @@ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
|
7
7
|
export interface PlaceholderPluginOptions {
|
|
8
8
|
emptyLinePlaceholder?: string;
|
|
9
9
|
enableLoadingSpinner?: boolean;
|
|
10
|
+
isPlaceholderHidden?: boolean;
|
|
10
11
|
placeholder?: string;
|
|
11
12
|
placeholderADF?: DocNode;
|
|
12
13
|
placeholderBracketHint?: string;
|
|
@@ -3,4 +3,4 @@ import type { DocNode } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { PlaceholderPlugin } from '../placeholderPluginType';
|
|
6
|
-
export default function createPlugin(intl: IntlShape, defaultPlaceholderText?: string, bracketPlaceholderText?: string, emptyLinePlaceholder?: string, placeholderPrompts?: string[], withEmptyParagraph?: boolean, placeholderADF?: DocNode, api?: ExtractInjectionAPI<PlaceholderPlugin>): SafePlugin | undefined;
|
|
6
|
+
export default function createPlugin(intl: IntlShape, defaultPlaceholderText?: string, bracketPlaceholderText?: string, emptyLinePlaceholder?: string, placeholderPrompts?: string[], withEmptyParagraph?: boolean, initialIsPlaceholderHidden?: boolean, placeholderADF?: DocNode, api?: ExtractInjectionAPI<PlaceholderPlugin>): SafePlugin | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"@atlaskit/css": "^0.19.0",
|
|
32
32
|
"@atlaskit/editor-plugin-composition": "^6.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-focus": "^6.0.0",
|
|
34
|
-
"@atlaskit/editor-plugin-show-diff": "^4.
|
|
34
|
+
"@atlaskit/editor-plugin-show-diff": "^4.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-type-ahead": "^7.0.0",
|
|
36
36
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
38
38
|
"@atlaskit/primitives": "^18.0.0",
|
|
39
39
|
"@atlaskit/spinner": "^19.0.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^31.0.0",
|
|
41
41
|
"@atlaskit/tokens": "^11.0.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0"
|
|
43
43
|
},
|