@atlaskit/editor-plugin-placeholder 29.0.3 → 29.0.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 +8 -0
- package/dist/cjs/placeholderPlugin.js +4 -33
- package/dist/es2019/placeholderPlugin.js +4 -33
- package/dist/esm/placeholderPlugin.js +4 -33
- package/package.json +2 -7
- package/dist/cjs/placeholderPlugin.compiled.css +0 -5
- package/dist/es2019/placeholderPlugin.compiled.css +0 -5
- package/dist/esm/placeholderPlugin.compiled.css +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder
|
|
2
2
|
|
|
3
|
+
## 29.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a11407acf9fad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a11407acf9fad) -
|
|
8
|
+
Clean up platform_editor_placeholder_collab_spinner, retaining the reactive collaboration loading
|
|
9
|
+
spinner.
|
|
10
|
+
|
|
3
11
|
## 29.0.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* placeholderPlugin.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,15 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.pluginKey = exports.placeholderPlugin = exports.EMPTY_PARAGRAPH_TIMEOUT_DELAY = void 0;
|
|
9
|
-
require("./placeholderPlugin.compiled.css");
|
|
10
|
-
var _runtime = require("@compiled/react/runtime");
|
|
11
8
|
var _react = _interopRequireDefault(require("react"));
|
|
12
9
|
var _isSsr = require("@atlaskit/editor-common/is-ssr");
|
|
13
|
-
var _document = require("@atlaskit/editor-common/utils/document");
|
|
14
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
|
-
var _box = require("@atlaskit/primitives/compiled/box");
|
|
17
|
-
var _spinner = _interopRequireDefault(require("@atlaskit/spinner/spinner"));
|
|
18
11
|
var _PlaceholderLoadingSpinner = require("./PlaceholderLoadingSpinner");
|
|
19
12
|
var _main = _interopRequireDefault(require("./pm-plugins/main"));
|
|
20
13
|
var EMPTY_PARAGRAPH_TIMEOUT_DELAY = exports.EMPTY_PARAGRAPH_TIMEOUT_DELAY = 2000; // Delay before showing placeholder on empty paragraph
|
|
@@ -66,7 +59,6 @@ var placeholderPlugin = exports.placeholderPlugin = function placeholderPlugin(_
|
|
|
66
59
|
}];
|
|
67
60
|
},
|
|
68
61
|
contentComponent: function contentComponent(params) {
|
|
69
|
-
var _params$editorView, _params$editorView2;
|
|
70
62
|
if ((0, _isSsr.isSSR)()) {
|
|
71
63
|
return null;
|
|
72
64
|
}
|
|
@@ -75,31 +67,10 @@ var placeholderPlugin = exports.placeholderPlugin = function placeholderPlugin(_
|
|
|
75
67
|
if ((options === null || options === void 0 ? void 0 : options.enableLoadingSpinner) === false) {
|
|
76
68
|
return null;
|
|
77
69
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
var doc = (_params$editorView = params.editorView) === null || _params$editorView === void 0 ? void 0 : _params$editorView.state.doc;
|
|
85
|
-
|
|
86
|
-
// @ts-ignore fix which needs follow up to use standard apis
|
|
87
|
-
var collabEditPluginState = (_params$editorView2 = params.editorView) === null || _params$editorView2 === void 0 || (_params$editorView2 = _params$editorView2.state) === null || _params$editorView2 === void 0 ? void 0 : _params$editorView2.collabEditPlugin$;
|
|
88
|
-
if (collabEditPluginState && collabEditPluginState.isReady !== true) {
|
|
89
|
-
if (doc && !(0, _document.isEmptyDocument)(doc)) {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
return /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
93
|
-
xcss: spinnerContainerStyles.spinnerContainer
|
|
94
|
-
}, /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
95
|
-
interactionName: "live-pages-loading-spinner",
|
|
96
|
-
size: "medium"
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
return null;
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_PlaceholderLoadingSpinner.PlaceholderLoadingSpinner, {
|
|
71
|
+
api: api,
|
|
72
|
+
editorView: params.editorView
|
|
73
|
+
});
|
|
100
74
|
}
|
|
101
75
|
};
|
|
102
|
-
};
|
|
103
|
-
var spinnerContainerStyles = {
|
|
104
|
-
spinnerContainer: "_1e0c1txw _2lx21bp4 _1bah1h6o _4cvr1h6o _1bsb1osq"
|
|
105
76
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/* placeholderPlugin.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
import "./placeholderPlugin.compiled.css";
|
|
3
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
4
1
|
import React from 'react';
|
|
5
2
|
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
6
|
-
import { isEmptyDocument } from '@atlaskit/editor-common/utils/document';
|
|
7
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
|
-
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
10
|
-
import Spinner from '@atlaskit/spinner/spinner';
|
|
11
4
|
import { PlaceholderLoadingSpinner } from './PlaceholderLoadingSpinner';
|
|
12
5
|
import createPlugin from './pm-plugins/main';
|
|
13
6
|
export const EMPTY_PARAGRAPH_TIMEOUT_DELAY = 2000; // Delay before showing placeholder on empty paragraph
|
|
@@ -56,7 +49,6 @@ export const placeholderPlugin = ({
|
|
|
56
49
|
}];
|
|
57
50
|
},
|
|
58
51
|
contentComponent: params => {
|
|
59
|
-
var _params$editorView, _params$editorView2, _params$editorView2$s;
|
|
60
52
|
if (isSSR()) {
|
|
61
53
|
return null;
|
|
62
54
|
}
|
|
@@ -65,31 +57,10 @@ export const placeholderPlugin = ({
|
|
|
65
57
|
if ((options === null || options === void 0 ? void 0 : options.enableLoadingSpinner) === false) {
|
|
66
58
|
return null;
|
|
67
59
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
const doc = (_params$editorView = params.editorView) === null || _params$editorView === void 0 ? void 0 : _params$editorView.state.doc;
|
|
75
|
-
|
|
76
|
-
// @ts-ignore fix which needs follow up to use standard apis
|
|
77
|
-
const collabEditPluginState = (_params$editorView2 = params.editorView) === null || _params$editorView2 === void 0 ? void 0 : (_params$editorView2$s = _params$editorView2.state) === null || _params$editorView2$s === void 0 ? void 0 : _params$editorView2$s.collabEditPlugin$;
|
|
78
|
-
if (collabEditPluginState && collabEditPluginState.isReady !== true) {
|
|
79
|
-
if (doc && !isEmptyDocument(doc)) {
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
83
|
-
xcss: spinnerContainerStyles.spinnerContainer
|
|
84
|
-
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
85
|
-
interactionName: "live-pages-loading-spinner",
|
|
86
|
-
size: "medium"
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
return null;
|
|
60
|
+
return /*#__PURE__*/React.createElement(PlaceholderLoadingSpinner, {
|
|
61
|
+
api: api,
|
|
62
|
+
editorView: params.editorView
|
|
63
|
+
});
|
|
90
64
|
}
|
|
91
65
|
};
|
|
92
|
-
};
|
|
93
|
-
const spinnerContainerStyles = {
|
|
94
|
-
spinnerContainer: "_1e0c1txw _2lx21bp4 _1bah1h6o _4cvr1h6o _1bsb1osq"
|
|
95
66
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/* placeholderPlugin.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
import "./placeholderPlugin.compiled.css";
|
|
3
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
4
1
|
import React from 'react';
|
|
5
2
|
import { isSSR } from '@atlaskit/editor-common/is-ssr';
|
|
6
|
-
import { isEmptyDocument } from '@atlaskit/editor-common/utils/document';
|
|
7
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
|
-
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
10
|
-
import Spinner from '@atlaskit/spinner/spinner';
|
|
11
4
|
import { PlaceholderLoadingSpinner } from './PlaceholderLoadingSpinner';
|
|
12
5
|
import createPlugin from './pm-plugins/main';
|
|
13
6
|
export var EMPTY_PARAGRAPH_TIMEOUT_DELAY = 2000; // Delay before showing placeholder on empty paragraph
|
|
@@ -59,7 +52,6 @@ export var placeholderPlugin = function placeholderPlugin(_ref) {
|
|
|
59
52
|
}];
|
|
60
53
|
},
|
|
61
54
|
contentComponent: function contentComponent(params) {
|
|
62
|
-
var _params$editorView, _params$editorView2;
|
|
63
55
|
if (isSSR()) {
|
|
64
56
|
return null;
|
|
65
57
|
}
|
|
@@ -68,31 +60,10 @@ export var placeholderPlugin = function placeholderPlugin(_ref) {
|
|
|
68
60
|
if ((options === null || options === void 0 ? void 0 : options.enableLoadingSpinner) === false) {
|
|
69
61
|
return null;
|
|
70
62
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
var doc = (_params$editorView = params.editorView) === null || _params$editorView === void 0 ? void 0 : _params$editorView.state.doc;
|
|
78
|
-
|
|
79
|
-
// @ts-ignore fix which needs follow up to use standard apis
|
|
80
|
-
var collabEditPluginState = (_params$editorView2 = params.editorView) === null || _params$editorView2 === void 0 || (_params$editorView2 = _params$editorView2.state) === null || _params$editorView2 === void 0 ? void 0 : _params$editorView2.collabEditPlugin$;
|
|
81
|
-
if (collabEditPluginState && collabEditPluginState.isReady !== true) {
|
|
82
|
-
if (doc && !isEmptyDocument(doc)) {
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
86
|
-
xcss: spinnerContainerStyles.spinnerContainer
|
|
87
|
-
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
88
|
-
interactionName: "live-pages-loading-spinner",
|
|
89
|
-
size: "medium"
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
return null;
|
|
63
|
+
return /*#__PURE__*/React.createElement(PlaceholderLoadingSpinner, {
|
|
64
|
+
api: api,
|
|
65
|
+
editorView: params.editorView
|
|
66
|
+
});
|
|
93
67
|
}
|
|
94
68
|
};
|
|
95
|
-
};
|
|
96
|
-
var spinnerContainerStyles = {
|
|
97
|
-
spinnerContainer: "_1e0c1txw _2lx21bp4 _1bah1h6o _4cvr1h6o _1bsb1osq"
|
|
98
69
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder",
|
|
3
|
-
"version": "29.0.
|
|
3
|
+
"version": "29.0.4",
|
|
4
4
|
"description": "Placeholder plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@babel/runtime": "^7.0.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@atlaskit/editor-common": "^133.
|
|
40
|
+
"@atlaskit/editor-common": "^133.6.0",
|
|
41
41
|
"react": "^18.2.0 || ^19.2.0",
|
|
42
42
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
43
43
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -47,10 +47,5 @@
|
|
|
47
47
|
"react": "^19.2.0",
|
|
48
48
|
"react-dom": "^19.2.0",
|
|
49
49
|
"react-intl": "^7.0.0"
|
|
50
|
-
},
|
|
51
|
-
"platform-feature-flags": {
|
|
52
|
-
"platform_editor_placeholder_collab_spinner": {
|
|
53
|
-
"type": "boolean"
|
|
54
|
-
}
|
|
55
50
|
}
|
|
56
51
|
}
|