@atlaskit/editor-plugin-placeholder-text 7.1.6 → 7.1.7
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,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder-text
|
|
2
2
|
|
|
3
|
+
## 7.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
|
|
8
|
+
ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
|
|
9
|
+
project refs are setup
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 7.1.6
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -54,6 +54,8 @@ function createPlugin(dispatch, options, api) {
|
|
|
54
54
|
return newState;
|
|
55
55
|
} else if (state.showInsertPanelAt) {
|
|
56
56
|
var _newState = {
|
|
57
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
58
|
+
|
|
57
59
|
showInsertPanelAt: tr.mapping.map(state.showInsertPanelAt),
|
|
58
60
|
allowInserting: allowInserting
|
|
59
61
|
};
|
|
@@ -63,7 +65,10 @@ function createPlugin(dispatch, options, api) {
|
|
|
63
65
|
return state;
|
|
64
66
|
}
|
|
65
67
|
},
|
|
68
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
66
69
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
70
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
71
|
+
|
|
67
72
|
if (transactions.some(function (txn) {
|
|
68
73
|
return txn.docChanged;
|
|
69
74
|
})) {
|
|
@@ -103,7 +108,11 @@ function createPlugin(dispatch, options, api) {
|
|
|
103
108
|
},
|
|
104
109
|
props: {
|
|
105
110
|
decorations: _cursor.drawFakeTextCursor,
|
|
111
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
112
|
+
|
|
106
113
|
handleDOMEvents: {
|
|
114
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
115
|
+
|
|
107
116
|
beforeinput: function beforeinput(view, event) {
|
|
108
117
|
var state = view.state;
|
|
109
118
|
if (event instanceof InputEvent && !event.isComposing && event.inputType === 'insertText' && (0, _selectionUtils.isSelectionAtPlaceholder)(view.state.selection)) {
|
|
@@ -125,6 +134,8 @@ function createPlugin(dispatch, options, api) {
|
|
|
125
134
|
return false;
|
|
126
135
|
}
|
|
127
136
|
},
|
|
137
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
138
|
+
|
|
128
139
|
nodeViews: {
|
|
129
140
|
placeholder: function placeholder(node, view, getPos) {
|
|
130
141
|
return new _placeholderTextNodeview.PlaceholderTextNodeView(node, view, getPos);
|
|
@@ -44,6 +44,8 @@ export function createPlugin(dispatch, options, api) {
|
|
|
44
44
|
return newState;
|
|
45
45
|
} else if (state.showInsertPanelAt) {
|
|
46
46
|
const newState = {
|
|
47
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
48
|
+
|
|
47
49
|
showInsertPanelAt: tr.mapping.map(state.showInsertPanelAt),
|
|
48
50
|
allowInserting
|
|
49
51
|
};
|
|
@@ -53,7 +55,11 @@ export function createPlugin(dispatch, options, api) {
|
|
|
53
55
|
return state;
|
|
54
56
|
}
|
|
55
57
|
},
|
|
58
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
59
|
+
|
|
56
60
|
appendTransaction(transactions, oldState, newState) {
|
|
61
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
62
|
+
|
|
57
63
|
if (transactions.some(txn => txn.docChanged)) {
|
|
58
64
|
const didPlaceholderExistBeforeTxn = oldState.selection.$head.nodeAfter === newState.selection.$head.nodeAfter;
|
|
59
65
|
const adjacentNode = newState.selection.$head.nodeAfter;
|
|
@@ -96,7 +102,11 @@ export function createPlugin(dispatch, options, api) {
|
|
|
96
102
|
},
|
|
97
103
|
props: {
|
|
98
104
|
decorations: drawFakeTextCursor,
|
|
105
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
106
|
+
|
|
99
107
|
handleDOMEvents: {
|
|
108
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
109
|
+
|
|
100
110
|
beforeinput: (view, event) => {
|
|
101
111
|
const {
|
|
102
112
|
state
|
|
@@ -120,6 +130,8 @@ export function createPlugin(dispatch, options, api) {
|
|
|
120
130
|
return false;
|
|
121
131
|
}
|
|
122
132
|
},
|
|
133
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
134
|
+
|
|
123
135
|
nodeViews: {
|
|
124
136
|
placeholder: (node, view, getPos) => new PlaceholderTextNodeView(node, view, getPos)
|
|
125
137
|
}
|
|
@@ -46,6 +46,8 @@ export function createPlugin(dispatch, options, api) {
|
|
|
46
46
|
return newState;
|
|
47
47
|
} else if (state.showInsertPanelAt) {
|
|
48
48
|
var _newState = {
|
|
49
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
50
|
+
|
|
49
51
|
showInsertPanelAt: tr.mapping.map(state.showInsertPanelAt),
|
|
50
52
|
allowInserting: allowInserting
|
|
51
53
|
};
|
|
@@ -55,7 +57,10 @@ export function createPlugin(dispatch, options, api) {
|
|
|
55
57
|
return state;
|
|
56
58
|
}
|
|
57
59
|
},
|
|
60
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
58
61
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
62
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
63
|
+
|
|
59
64
|
if (transactions.some(function (txn) {
|
|
60
65
|
return txn.docChanged;
|
|
61
66
|
})) {
|
|
@@ -95,7 +100,11 @@ export function createPlugin(dispatch, options, api) {
|
|
|
95
100
|
},
|
|
96
101
|
props: {
|
|
97
102
|
decorations: drawFakeTextCursor,
|
|
103
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
104
|
+
|
|
98
105
|
handleDOMEvents: {
|
|
106
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
107
|
+
|
|
99
108
|
beforeinput: function beforeinput(view, event) {
|
|
100
109
|
var state = view.state;
|
|
101
110
|
if (event instanceof InputEvent && !event.isComposing && event.inputType === 'insertText' && isSelectionAtPlaceholder(view.state.selection)) {
|
|
@@ -117,6 +126,8 @@ export function createPlugin(dispatch, options, api) {
|
|
|
117
126
|
return false;
|
|
118
127
|
}
|
|
119
128
|
},
|
|
129
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
130
|
+
|
|
120
131
|
nodeViews: {
|
|
121
132
|
placeholder: function placeholder(node, view, getPos) {
|
|
122
133
|
return new PlaceholderTextNodeView(node, view, getPos);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder-text",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.7",
|
|
4
4
|
"description": "placeholder text plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
35
35
|
"@atlaskit/icon": "^29.0.0",
|
|
36
36
|
"@atlaskit/theme": "^21.0.0",
|
|
37
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
38
|
-
"@atlaskit/tokens": "^8.
|
|
37
|
+
"@atlaskit/tmp-editor-statsig": "^13.42.0",
|
|
38
|
+
"@atlaskit/tokens": "^8.3.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0",
|
|
40
40
|
"@emotion/react": "^11.7.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@atlaskit/editor-common": "^110.
|
|
43
|
+
"@atlaskit/editor-common": "^110.34.0",
|
|
44
44
|
"react": "^18.2.0",
|
|
45
45
|
"react-dom": "^18.2.0",
|
|
46
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|