@atlaskit/editor-common 102.16.1 → 102.17.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 102.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#132362](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132362)
8
+ [`2e90b51d52288`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2e90b51d52288) -
9
+ [ux] [ED-26841] Do not autofocus editor when it is a live page with content. Additionally hide
10
+ cursor marks and ensure cursor starts at the very start of document to prevent selection
11
+ appearance and toolbars.
12
+
13
+ ### Patch Changes
14
+
15
+ - [#135116](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/135116)
16
+ [`989fa04bd7476`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/989fa04bd7476) -
17
+ [A11Y-9876] Confluence AI: Inappropriate aria-label defined to textarea fix
18
+ - Updated dependencies
19
+
3
20
  ## 102.16.1
4
21
 
5
22
  ### Patch Changes
@@ -129,6 +129,11 @@ var aiMessages = exports.aiMessages = (0, _reactIntlNext.defineMessages)({
129
129
  description: 'Message to users that displays when an error occurs while generating a preview.'
130
130
  },
131
131
  // Prompt Builder messages
132
+ promptbuilderAriaLabel: {
133
+ id: 'fabric.editor.ai.commandPalette.promptBuilderForm.generateContent.ariaLabel',
134
+ defaultMessage: 'Ask Atlassian Intelligence',
135
+ description: 'Aria label for prompt builder form'
136
+ },
132
137
  promptBuilderFromButton: {
133
138
  id: 'fabric.editor.ai.commandPalette.promptBuilderForm.buttons.submit',
134
139
  defaultMessage: 'Generate',
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "102.16.1";
20
+ var packageVersion = "102.17.0";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // Ignored via go/ees007
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "102.16.1";
26
+ var packageVersion = "102.17.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -40,6 +40,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
40
40
  id: 'fabric.editor.expandPlaceholder',
41
41
  defaultMessage: 'Give this expand a title...',
42
42
  description: 'Placeholder text for an expand node title input field'
43
+ },
44
+ expandArialabel: {
45
+ id: 'fabric.editor.expandAriaLabel',
46
+ defaultMessage: 'Give this expand a title',
47
+ description: 'aria label for an expand node title input field'
43
48
  }
44
49
  });
45
50
  var ExpandIconWrapper = exports.ExpandIconWrapper = function ExpandIconWrapper(_ref) {
@@ -203,7 +203,7 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
203
203
  }(_react.Component);
204
204
  };
205
205
  var withImageLoader = exports.withImageLoader = function withImageLoader(Wrapped) {
206
- if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
206
+ if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2') || (0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2_extended')) {
207
207
  return withImageLoaderNew(Wrapped);
208
208
  }
209
209
  return withImageLoaderOld(Wrapped);
@@ -1267,6 +1267,13 @@ var _withFeatureFlaggedComponent = require("./withFeatureFlaggedComponent");
1267
1267
  // prosemirror-history does not export its plugin key
1268
1268
  var pmHistoryPluginKey = exports.pmHistoryPluginKey = 'history$';
1269
1269
 
1270
+ /**
1271
+ * @private
1272
+ * @deprecated
1273
+ *
1274
+ * Use `@atlaskit/editor-common/utils/document` entry-point instead.
1275
+ */
1276
+
1270
1277
  /**
1271
1278
  * @private
1272
1279
  * @deprecated
@@ -123,6 +123,11 @@ export const aiMessages = defineMessages({
123
123
  description: 'Message to users that displays when an error occurs while generating a preview.'
124
124
  },
125
125
  // Prompt Builder messages
126
+ promptbuilderAriaLabel: {
127
+ id: 'fabric.editor.ai.commandPalette.promptBuilderForm.generateContent.ariaLabel',
128
+ defaultMessage: 'Ask Atlassian Intelligence',
129
+ description: 'Aria label for prompt builder form'
130
+ },
126
131
  promptBuilderFromButton: {
127
132
  id: 'fabric.editor.ai.commandPalette.promptBuilderForm.buttons.submit',
128
133
  defaultMessage: 'Generate',
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "102.16.1";
4
+ const packageVersion = "102.17.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "102.16.1";
16
+ const packageVersion = "102.17.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -30,6 +30,11 @@ export const messages = defineMessages({
30
30
  id: 'fabric.editor.expandPlaceholder',
31
31
  defaultMessage: 'Give this expand a title...',
32
32
  description: 'Placeholder text for an expand node title input field'
33
+ },
34
+ expandArialabel: {
35
+ id: 'fabric.editor.expandAriaLabel',
36
+ defaultMessage: 'Give this expand a title',
37
+ description: 'aria label for an expand node title input field'
33
38
  }
34
39
  });
35
40
  export const ExpandIconWrapper = ({
@@ -156,7 +156,7 @@ const withImageLoaderNew = Wrapped => class WithImageLoader extends Component {
156
156
  }
157
157
  };
158
158
  export const withImageLoader = Wrapped => {
159
- if (fg('platform_editor_react18_phase2_v2')) {
159
+ if (fg('platform_editor_react18_phase2_v2') || fg('platform_editor_react18_phase2_v2_extended')) {
160
160
  return withImageLoaderNew(Wrapped);
161
161
  }
162
162
  return withImageLoaderOld(Wrapped);
@@ -161,6 +161,13 @@ export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLink
161
161
  // prosemirror-history does not export its plugin key
162
162
  export const pmHistoryPluginKey = 'history$';
163
163
  export { gridTypeForLayout } from './grid';
164
+
165
+ /**
166
+ * @private
167
+ * @deprecated
168
+ *
169
+ * Use `@atlaskit/editor-common/utils/document` entry-point instead.
170
+ */
164
171
  export { nodesBetweenChanged, getStepRange, isEmptyDocument, hasDocAsParent, bracketTyped, hasVisibleContent, isSelectionEndOfParagraph, getChangedNodes } from './document';
165
172
 
166
173
  /**
@@ -123,6 +123,11 @@ export var aiMessages = defineMessages({
123
123
  description: 'Message to users that displays when an error occurs while generating a preview.'
124
124
  },
125
125
  // Prompt Builder messages
126
+ promptbuilderAriaLabel: {
127
+ id: 'fabric.editor.ai.commandPalette.promptBuilderForm.generateContent.ariaLabel',
128
+ defaultMessage: 'Ask Atlassian Intelligence',
129
+ description: 'Aria label for prompt builder form'
130
+ },
126
131
  promptBuilderFromButton: {
127
132
  id: 'fabric.editor.ai.commandPalette.promptBuilderForm.buttons.submit',
128
133
  defaultMessage: 'Generate',
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "102.16.1";
10
+ var packageVersion = "102.17.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "102.16.1";
23
+ var packageVersion = "102.17.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -32,6 +32,11 @@ export var messages = defineMessages({
32
32
  id: 'fabric.editor.expandPlaceholder',
33
33
  defaultMessage: 'Give this expand a title...',
34
34
  description: 'Placeholder text for an expand node title input field'
35
+ },
36
+ expandArialabel: {
37
+ id: 'fabric.editor.expandAriaLabel',
38
+ defaultMessage: 'Give this expand a title',
39
+ description: 'aria label for an expand node title input field'
35
40
  }
36
41
  });
37
42
  export var ExpandIconWrapper = function ExpandIconWrapper(_ref) {
@@ -193,7 +193,7 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
193
193
  }(Component);
194
194
  };
195
195
  export var withImageLoader = function withImageLoader(Wrapped) {
196
- if (fg('platform_editor_react18_phase2_v2')) {
196
+ if (fg('platform_editor_react18_phase2_v2') || fg('platform_editor_react18_phase2_v2_extended')) {
197
197
  return withImageLoaderNew(Wrapped);
198
198
  }
199
199
  return withImageLoaderOld(Wrapped);
@@ -161,6 +161,13 @@ export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLink
161
161
  // prosemirror-history does not export its plugin key
162
162
  export var pmHistoryPluginKey = 'history$';
163
163
  export { gridTypeForLayout } from './grid';
164
+
165
+ /**
166
+ * @private
167
+ * @deprecated
168
+ *
169
+ * Use `@atlaskit/editor-common/utils/document` entry-point instead.
170
+ */
164
171
  export { nodesBetweenChanged, getStepRange, isEmptyDocument, hasDocAsParent, bracketTyped, hasVisibleContent, isSelectionEndOfParagraph, getChangedNodes } from './document';
165
172
 
166
173
  /**
@@ -114,6 +114,11 @@ export declare const aiMessages: {
114
114
  defaultMessage: string;
115
115
  description: string;
116
116
  };
117
+ promptbuilderAriaLabel: {
118
+ id: string;
119
+ defaultMessage: string;
120
+ description: string;
121
+ };
117
122
  promptBuilderFromButton: {
118
123
  id: string;
119
124
  defaultMessage: string;
@@ -21,6 +21,11 @@ export declare const messages: {
21
21
  defaultMessage: string;
22
22
  description: string;
23
23
  };
24
+ expandArialabel: {
25
+ id: string;
26
+ defaultMessage: string;
27
+ description: string;
28
+ };
24
29
  };
25
30
  export declare const ExpandIconWrapper: ({ children, expanded, }: React.HTMLAttributes<HTMLDivElement> & {
26
31
  expanded: boolean;
@@ -167,6 +167,12 @@ export { getItemCounterDigitsSize, getOrderFromOrderedListNode, resolveOrder, is
167
167
  export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLinkDomain, findFilepaths, isLinkInMatches, FILEPATH_REGEXP, DONTLINKIFY_REGEXP, getLinkCreationAnalyticsEvent, canLinkBeCreatedInRange, } from './hyperlink';
168
168
  export declare const pmHistoryPluginKey = "history$";
169
169
  export { gridTypeForLayout } from './grid';
170
+ /**
171
+ * @private
172
+ * @deprecated
173
+ *
174
+ * Use `@atlaskit/editor-common/utils/document` entry-point instead.
175
+ */
170
176
  export { nodesBetweenChanged, getStepRange, isEmptyDocument, hasDocAsParent, bracketTyped, hasVisibleContent, isSelectionEndOfParagraph, getChangedNodes, } from './document';
171
177
  /**
172
178
  * @private
@@ -114,6 +114,11 @@ export declare const aiMessages: {
114
114
  defaultMessage: string;
115
115
  description: string;
116
116
  };
117
+ promptbuilderAriaLabel: {
118
+ id: string;
119
+ defaultMessage: string;
120
+ description: string;
121
+ };
117
122
  promptBuilderFromButton: {
118
123
  id: string;
119
124
  defaultMessage: string;
@@ -21,6 +21,11 @@ export declare const messages: {
21
21
  defaultMessage: string;
22
22
  description: string;
23
23
  };
24
+ expandArialabel: {
25
+ id: string;
26
+ defaultMessage: string;
27
+ description: string;
28
+ };
24
29
  };
25
30
  export declare const ExpandIconWrapper: ({ children, expanded, }: React.HTMLAttributes<HTMLDivElement> & {
26
31
  expanded: boolean;
@@ -167,6 +167,12 @@ export { getItemCounterDigitsSize, getOrderFromOrderedListNode, resolveOrder, is
167
167
  export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLinkDomain, findFilepaths, isLinkInMatches, FILEPATH_REGEXP, DONTLINKIFY_REGEXP, getLinkCreationAnalyticsEvent, canLinkBeCreatedInRange, } from './hyperlink';
168
168
  export declare const pmHistoryPluginKey = "history$";
169
169
  export { gridTypeForLayout } from './grid';
170
+ /**
171
+ * @private
172
+ * @deprecated
173
+ *
174
+ * Use `@atlaskit/editor-common/utils/document` entry-point instead.
175
+ */
170
176
  export { nodesBetweenChanged, getStepRange, isEmptyDocument, hasDocAsParent, bracketTyped, hasVisibleContent, isSelectionEndOfParagraph, getChangedNodes, } from './document';
171
177
  /**
172
178
  * @private
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "102.16.1",
3
+ "version": "102.17.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -47,6 +47,7 @@
47
47
  "./types": "./src/types/index.ts",
48
48
  "./ui": "./src/ui/index.tsx",
49
49
  "./utils/analytics": "./src/utils/analytics.ts",
50
+ "./utils/document": "./src/utils/document.ts",
50
51
  "./utils": "./src/utils/index.ts",
51
52
  "./card": "./src/card/index.ts",
52
53
  "./collab": "./src/collab/index.ts",
@@ -124,7 +125,7 @@
124
125
  "@atlaskit/analytics-next": "^11.0.0",
125
126
  "@atlaskit/atlassian-context": "^0.2.0",
126
127
  "@atlaskit/button": "^23.0.0",
127
- "@atlaskit/code": "^16.1.0",
128
+ "@atlaskit/code": "^16.2.0",
128
129
  "@atlaskit/codemod-utils": "^4.2.0",
129
130
  "@atlaskit/css": "^0.10.0",
130
131
  "@atlaskit/custom-steps": "^0.11.0",
@@ -259,6 +260,9 @@
259
260
  "platform_editor_react18_phase2_v2": {
260
261
  "type": "boolean"
261
262
  },
263
+ "platform_editor_react18_phase2_v2_extended": {
264
+ "type": "boolean"
265
+ },
262
266
  "platform_editor_allow_annotation_triple_click": {
263
267
  "type": "boolean"
264
268
  },
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/utils/document",
3
+ "main": "../../dist/cjs/utils/document.js",
4
+ "module": "../../dist/esm/utils/document.js",
5
+ "module:es2019": "../../dist/es2019/utils/document.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/utils/document.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.4": {
12
+ "*": [
13
+ "../../dist/types-ts4.5/utils/document.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }