@atlaskit/editor-plugin-placeholder 0.1.8 → 0.1.10
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/plugin.js +6 -5
- package/dist/es2019/plugin.js +6 -5
- package/dist/esm/plugin.js +6 -5
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder
|
|
2
2
|
|
|
3
|
+
## 0.1.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238) [`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) - [ED-21835] Change EditorAPI type to always union with undefined
|
|
8
|
+
|
|
9
|
+
## 0.1.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 0.1.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -80,11 +80,11 @@ function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api) {
|
|
|
80
80
|
key: pluginKey,
|
|
81
81
|
state: {
|
|
82
82
|
init: function init(_, state) {
|
|
83
|
-
var _api$focus;
|
|
84
|
-
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 || (_api$focus = api.focus) === null || _api$focus === void 0 || (_api$focus = _api$focus.sharedState.currentState()) === null || _api$focus === void 0 ? void 0 : _api$focus.hasFocus), state, api === null || api === void 0 ? void 0 :
|
|
83
|
+
var _api$focus, _api$typeAhead;
|
|
84
|
+
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 || (_api$focus = api.focus) === null || _api$focus === void 0 || (_api$focus = _api$focus.sharedState.currentState()) === null || _api$focus === void 0 ? void 0 : _api$focus.hasFocus), state, api === null || api === void 0 || (_api$typeAhead = api.typeAhead) === null || _api$typeAhead === void 0 ? void 0 : _api$typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
85
85
|
},
|
|
86
86
|
apply: function apply(tr, _oldPluginState, _oldEditorState, newEditorState) {
|
|
87
|
-
var _api$focus2;
|
|
87
|
+
var _api$focus2, _api$typeAhead3;
|
|
88
88
|
var meta = tr.getMeta(pluginKey);
|
|
89
89
|
var isEditorFocused = Boolean(api === null || api === void 0 || (_api$focus2 = api.focus) === null || _api$focus2 === void 0 || (_api$focus2 = _api$focus2.sharedState.currentState()) === null || _api$focus2 === void 0 ? void 0 : _api$focus2.hasFocus);
|
|
90
90
|
if (meta) {
|
|
@@ -92,10 +92,11 @@ function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api) {
|
|
|
92
92
|
return emptyPlaceholder;
|
|
93
93
|
}
|
|
94
94
|
if (meta.applyPlaceholderIfEmpty) {
|
|
95
|
-
|
|
95
|
+
var _api$typeAhead2;
|
|
96
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 || (_api$typeAhead2 = api.typeAhead) === null || _api$typeAhead2 === void 0 ? void 0 : _api$typeAhead2.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
|
-
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 :
|
|
99
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 || (_api$typeAhead3 = api.typeAhead) === null || _api$typeAhead3 === void 0 ? void 0 : _api$typeAhead3.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
99
100
|
}
|
|
100
101
|
},
|
|
101
102
|
props: {
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -73,11 +73,11 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
73
73
|
key: pluginKey,
|
|
74
74
|
state: {
|
|
75
75
|
init: (_, state) => {
|
|
76
|
-
var _api$focus, _api$focus$sharedStat;
|
|
77
|
-
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$focus = api.focus) === null || _api$focus === void 0 ? void 0 : (_api$focus$sharedStat = _api$focus.sharedState.currentState()) === null || _api$focus$sharedStat === void 0 ? void 0 : _api$focus$sharedStat.hasFocus), state, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
76
|
+
var _api$focus, _api$focus$sharedStat, _api$typeAhead;
|
|
77
|
+
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$focus = api.focus) === null || _api$focus === void 0 ? void 0 : (_api$focus$sharedStat = _api$focus.sharedState.currentState()) === null || _api$focus$sharedStat === void 0 ? void 0 : _api$focus$sharedStat.hasFocus), state, api === null || api === void 0 ? void 0 : (_api$typeAhead = api.typeAhead) === null || _api$typeAhead === void 0 ? void 0 : _api$typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
78
78
|
},
|
|
79
79
|
apply: (tr, _oldPluginState, _oldEditorState, newEditorState) => {
|
|
80
|
-
var _api$focus2, _api$focus2$sharedSta;
|
|
80
|
+
var _api$focus2, _api$focus2$sharedSta, _api$typeAhead3;
|
|
81
81
|
const meta = tr.getMeta(pluginKey);
|
|
82
82
|
const isEditorFocused = Boolean(api === null || api === void 0 ? void 0 : (_api$focus2 = api.focus) === null || _api$focus2 === void 0 ? void 0 : (_api$focus2$sharedSta = _api$focus2.sharedState.currentState()) === null || _api$focus2$sharedSta === void 0 ? void 0 : _api$focus2$sharedSta.hasFocus);
|
|
83
83
|
if (meta) {
|
|
@@ -85,10 +85,11 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
85
85
|
return emptyPlaceholder;
|
|
86
86
|
}
|
|
87
87
|
if (meta.applyPlaceholderIfEmpty) {
|
|
88
|
-
|
|
88
|
+
var _api$typeAhead2;
|
|
89
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 : (_api$typeAhead2 = api.typeAhead) === null || _api$typeAhead2 === void 0 ? void 0 : _api$typeAhead2.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
|
-
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 : api.typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
92
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 : (_api$typeAhead3 = api.typeAhead) === null || _api$typeAhead3 === void 0 ? void 0 : _api$typeAhead3.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
props: {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -72,11 +72,11 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
72
72
|
key: pluginKey,
|
|
73
73
|
state: {
|
|
74
74
|
init: function init(_, state) {
|
|
75
|
-
var _api$focus;
|
|
76
|
-
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 || (_api$focus = api.focus) === null || _api$focus === void 0 || (_api$focus = _api$focus.sharedState.currentState()) === null || _api$focus === void 0 ? void 0 : _api$focus.hasFocus), state, api === null || api === void 0 ? void 0 :
|
|
75
|
+
var _api$focus, _api$typeAhead;
|
|
76
|
+
return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 || (_api$focus = api.focus) === null || _api$focus === void 0 || (_api$focus = _api$focus.sharedState.currentState()) === null || _api$focus === void 0 ? void 0 : _api$focus.hasFocus), state, api === null || api === void 0 || (_api$typeAhead = api.typeAhead) === null || _api$typeAhead === void 0 ? void 0 : _api$typeAhead.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
77
77
|
},
|
|
78
78
|
apply: function apply(tr, _oldPluginState, _oldEditorState, newEditorState) {
|
|
79
|
-
var _api$focus2;
|
|
79
|
+
var _api$focus2, _api$typeAhead3;
|
|
80
80
|
var meta = tr.getMeta(pluginKey);
|
|
81
81
|
var isEditorFocused = Boolean(api === null || api === void 0 || (_api$focus2 = api.focus) === null || _api$focus2 === void 0 || (_api$focus2 = _api$focus2.sharedState.currentState()) === null || _api$focus2 === void 0 ? void 0 : _api$focus2.hasFocus);
|
|
82
82
|
if (meta) {
|
|
@@ -84,10 +84,11 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
|
|
|
84
84
|
return emptyPlaceholder;
|
|
85
85
|
}
|
|
86
86
|
if (meta.applyPlaceholderIfEmpty) {
|
|
87
|
-
|
|
87
|
+
var _api$typeAhead2;
|
|
88
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 || (_api$typeAhead2 = api.typeAhead) === null || _api$typeAhead2 === void 0 ? void 0 : _api$typeAhead2.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
|
-
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 ? void 0 :
|
|
91
|
+
return createPlaceHolderStateFrom(isEditorFocused, newEditorState, api === null || api === void 0 || (_api$typeAhead3 = api.typeAhead) === null || _api$typeAhead3 === void 0 ? void 0 : _api$typeAhead3.actions.isOpen, defaultPlaceholderText, bracketPlaceholderText);
|
|
91
92
|
}
|
|
92
93
|
},
|
|
93
94
|
props: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
"atlassian": {
|
|
11
11
|
"team": "Editor: Scarlet",
|
|
12
12
|
"singleton": true,
|
|
13
|
-
"releaseModel": "continuous"
|
|
13
|
+
"releaseModel": "continuous",
|
|
14
|
+
"runReact18": false
|
|
14
15
|
},
|
|
15
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
16
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
16
17
|
"main": "dist/cjs/index.js",
|
|
17
18
|
"module": "dist/esm/index.js",
|
|
18
19
|
"module:es2019": "dist/es2019/index.js",
|
|
@@ -31,10 +32,10 @@
|
|
|
31
32
|
".": "./src/index.ts"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^76.
|
|
35
|
+
"@atlaskit/editor-common": "^76.39.0",
|
|
35
36
|
"@atlaskit/editor-plugin-composition": "^0.1.0",
|
|
36
37
|
"@atlaskit/editor-plugin-focus": "^0.2.0",
|
|
37
|
-
"@atlaskit/editor-plugin-type-ahead": "^0.
|
|
38
|
+
"@atlaskit/editor-plugin-type-ahead": "^0.9.0",
|
|
38
39
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
39
40
|
"@babel/runtime": "^7.0.0"
|
|
40
41
|
},
|