@atlaskit/editor-core 204.7.2 → 204.8.1

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,29 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 204.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#131399](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131399)
8
+ [`3e2bb97c408f7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3e2bb97c408f7) -
9
+ Add className to nested nodes for placeholder text to selectively apply truncation on long text
10
+ - Updated dependencies
11
+
12
+ ## 204.8.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#126109](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/126109)
17
+ [`b8eb107432364`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b8eb107432364) -
18
+ marked EditorActions as deprecated
19
+
20
+ ### Patch Changes
21
+
22
+ - [#130624](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/130624)
23
+ [`8f52e4f05f49b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8f52e4f05f49b) -
24
+ updated docs to reflect our upgrade of editor-core to React 18
25
+ - Updated dependencies
26
+
3
27
  ## 204.7.2
4
28
 
5
29
  ### Patch Changes
@@ -33,6 +33,14 @@ var fakePluginKey = {
33
33
  }
34
34
  };
35
35
 
36
+ /**
37
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-26729 Internal documentation for deprecation (no external access)} Editor actions is no longer supported and will be removed in a future version. Please use the core actions, or Plugin APIs directly instead
38
+ * @example If you were using editorActions.getValue() replace with:
39
+ const { editorApi, preset } = usePreset(...);
40
+ editorApi?.core.actions.requestDocument((doc) => {
41
+ // use doc as desired
42
+ })
43
+ */
36
44
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
45
  var EditorActions = exports.default = /*#__PURE__*/function () {
38
46
  function EditorActions() {
@@ -75,7 +75,7 @@ var placeholderStyles = exports.placeholderStyles = (0, _react2.css)({
75
75
  });
76
76
  var placeholderOverflowStyles = (0, _react2.css)({
77
77
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
78
- '.ProseMirror p:has(.placeholder-decoration)': {
78
+ '.ProseMirror p:has(.placeholder-decoration-hide-overflow)': {
79
79
  overflow: 'hidden',
80
80
  whiteSpace: 'nowrap',
81
81
  textOverflow: 'ellipsis'
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "204.7.2";
8
+ var version = exports.version = "204.8.1";
@@ -23,6 +23,14 @@ const fakePluginKey = {
23
23
  }
24
24
  };
25
25
 
26
+ /**
27
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-26729 Internal documentation for deprecation (no external access)} Editor actions is no longer supported and will be removed in a future version. Please use the core actions, or Plugin APIs directly instead
28
+ * @example If you were using editorActions.getValue() replace with:
29
+ const { editorApi, preset } = usePreset(...);
30
+ editorApi?.core.actions.requestDocument((doc) => {
31
+ // use doc as desired
32
+ })
33
+ */
26
34
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
35
  export default class EditorActions {
28
36
  constructor() {
@@ -150,7 +150,7 @@ export const placeholderStyles = css({
150
150
  });
151
151
  const placeholderOverflowStyles = css({
152
152
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
153
- '.ProseMirror p:has(.placeholder-decoration)': {
153
+ '.ProseMirror p:has(.placeholder-decoration-hide-overflow)': {
154
154
  overflow: 'hidden',
155
155
  whiteSpace: 'nowrap',
156
156
  textOverflow: 'ellipsis'
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "204.7.2";
2
+ export const version = "204.8.1";
@@ -27,6 +27,14 @@ var fakePluginKey = {
27
27
  }
28
28
  };
29
29
 
30
+ /**
31
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-26729 Internal documentation for deprecation (no external access)} Editor actions is no longer supported and will be removed in a future version. Please use the core actions, or Plugin APIs directly instead
32
+ * @example If you were using editorActions.getValue() replace with:
33
+ const { editorApi, preset } = usePreset(...);
34
+ editorApi?.core.actions.requestDocument((doc) => {
35
+ // use doc as desired
36
+ })
37
+ */
30
38
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
39
  var EditorActions = /*#__PURE__*/function () {
32
40
  function EditorActions() {
@@ -67,7 +67,7 @@ export var placeholderStyles = css({
67
67
  });
68
68
  var placeholderOverflowStyles = css({
69
69
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
70
- '.ProseMirror p:has(.placeholder-decoration)': {
70
+ '.ProseMirror p:has(.placeholder-decoration-hide-overflow)': {
71
71
  overflow: 'hidden',
72
72
  whiteSpace: 'nowrap',
73
73
  textOverflow: 'ellipsis'
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "204.7.2";
2
+ export var version = "204.8.1";
@@ -4,6 +4,14 @@ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
4
  import type { ContextUpdateHandler, EditorActionsOptions, FeatureFlags, ReplaceRawValue, GetResolvedEditorStateReason, Transformer } from '@atlaskit/editor-common/types';
5
5
  import { Node } from '@atlaskit/editor-prosemirror/model';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
+ /**
8
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-26729 Internal documentation for deprecation (no external access)} Editor actions is no longer supported and will be removed in a future version. Please use the core actions, or Plugin APIs directly instead
9
+ * @example If you were using editorActions.getValue() replace with:
10
+ const { editorApi, preset } = usePreset(...);
11
+ editorApi?.core.actions.requestDocument((doc) => {
12
+ // use doc as desired
13
+ })
14
+ */
7
15
  export default class EditorActions<T = any> implements EditorActionsOptions<T> {
8
16
  private editorView?;
9
17
  private contentTransformer?;
@@ -4,6 +4,14 @@ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
4
  import type { ContextUpdateHandler, EditorActionsOptions, FeatureFlags, ReplaceRawValue, GetResolvedEditorStateReason, Transformer } from '@atlaskit/editor-common/types';
5
5
  import { Node } from '@atlaskit/editor-prosemirror/model';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
+ /**
8
+ * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-26729 Internal documentation for deprecation (no external access)} Editor actions is no longer supported and will be removed in a future version. Please use the core actions, or Plugin APIs directly instead
9
+ * @example If you were using editorActions.getValue() replace with:
10
+ const { editorApi, preset } = usePreset(...);
11
+ editorApi?.core.actions.requestDocument((doc) => {
12
+ // use doc as desired
13
+ })
14
+ */
7
15
  export default class EditorActions<T = any> implements EditorActionsOptions<T> {
8
16
  private editorView?;
9
17
  private contentTransformer?;
package/docs/0-intro.tsx CHANGED
@@ -18,17 +18,17 @@ ${(<AtlassianInternalWarning />)}
18
18
 
19
19
  ## Prerequisites
20
20
 
21
- * **React 16:** at the time of writing, the Atlassian Editor is built on top of React 16 and doesn’t explicitly support any higher versions of React yet, which means both the \`react\` and \`react-dom\` libraries and their dependencies need to be set to React 16 compatible version.
21
+ * **React 18:** at the time of writing, the Atlassian Editor is built on top of React 18 and doesn’t explicitly support any higher versions of React yet, which means both the \`react\` and \`react-dom\` libraries and their dependencies need to be set to React 18 compatible version.
22
22
  * **Singleton:** the ProseMirror libraries in use and the document format \(Atlassian Document Format, ADF\) demand that some of the libraries using them are singletons, as multiple versions of the library will cause breaking issues. So, consumers of the Atlassian Editor need to enforce these singletons; this is usually done by deduplicating after installing the dependencies or by setting libraries to specific versions through resolutions to avoid multiple versions. Our recommendation is to use [yarn-deduplicate](https://www.npmjs.com/package/yarn-deduplicate).
23
23
 
24
24
  ## Installation
25
25
 
26
- 1. Install the editor libraries
26
+ 1. Install the editor libraries
27
27
  - **npm:** \`npm install --save @atlaskit/editor-core @atlaskit/css-reset\`
28
28
  - **yarn:** \`yarn add @atlaskit/editor-core @atlaskit/css-reset\`
29
29
 
30
30
  2. Deduplicate the dependencies \(if necessary\) by setting resolutions to avoid multiple versions of the editor libraries or by running [npm dedupe](https://docs.npmjs.com/cli/v6/commands/npm-dedupe) or [yarn dedupe](https://yarnpkg.com/cli/dedupe) after installation.
31
- 3. Setup the CSS reset in your application
31
+ 3. Setup the CSS reset in your application
32
32
  \`import '@atlaskit/css-reset';\`
33
33
 
34
34
  ## Usage
@@ -112,7 +112,7 @@ const createPreset = () =>
112
112
  }
113
113
  return builder; // Don't add the plugin
114
114
  });
115
-
115
+
116
116
  const { preset } = usePreset(createPreset);
117
117
  `}
118
118
 
@@ -199,7 +199,7 @@ ${code`
199
199
  const createPreset = () =>
200
200
  createDefaultPreset({ featureFlags: {}, paste: {} });
201
201
  const { preset } = usePreset(createPreset);
202
-
202
+
203
203
  return <ComposableEditor appearance='full-page' preset={preset} />;
204
204
  // Or full-width
205
205
  return <ComposableEditor appearance='full-width' preset={preset} />;
@@ -231,7 +231,7 @@ ${code`
231
231
 
232
232
  ### Collapsible Editor
233
233
 
234
- Sometimes, you may not want to display the whole Editor initially, and you'd prefer to show it in a collapsed state so that users can expand it when needed.
234
+ Sometimes, you may not want to display the whole Editor initially, and you'd prefer to show it in a collapsed state so that users can expand it when needed.
235
235
 
236
236
  Here's how you can implement this behavior:
237
237
 
@@ -368,7 +368,7 @@ function EditorInternal() {
368
368
  const { editorApi, preset } = usePreset(createPreset);
369
369
 
370
370
  // We memoise the transformer in case this component renders frequently
371
- const transformer = useMemo(() =>
371
+ const transformer = useMemo(() =>
372
372
  editorApi?.core?.actions?.createTransformer((schema) => new BitbucketTransformer(schema))
373
373
  , [editorApi])
374
374
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "204.7.2",
3
+ "version": "204.8.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -98,7 +98,7 @@
98
98
  "@atlaskit/media-core": "^35.0.0",
99
99
  "@atlaskit/media-integration-test-helpers": "^4.0.0",
100
100
  "@atlaskit/media-test-helpers": "^35.0.0",
101
- "@atlaskit/modal-dialog": "^13.4.0",
101
+ "@atlaskit/modal-dialog": "^14.0.0",
102
102
  "@atlaskit/primitives": "^14.2.0",
103
103
  "@atlaskit/renderer": "^114.5.0",
104
104
  "@atlaskit/smart-card": "^36.0.0",