@atlaskit/editor-common 111.26.0 → 111.28.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,28 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 111.28.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`17119fb95e0a4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/17119fb95e0a4) -
8
+ [EDITOR-3747](https://hello.jira.atlassian.cloud/browse/EDITOR-3747) - clean up
9
+ platform_editor_ssr_renderer experiment
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 111.27.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [`3c1ea42fe6741`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3c1ea42fe6741) -
20
+ add ai stt POC to editor
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 111.26.0
4
27
 
5
28
  ### Minor Changes
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "111.25.1";
22
+ var packageVersion = "111.27.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "111.25.1";
27
+ var packageVersion = "111.27.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -9,7 +9,6 @@ exports.processRawValueWithoutValidation = processRawValueWithoutValidation;
9
9
  var _transforms = require("@atlaskit/adf-utils/transforms");
10
10
  var _model = require("@atlaskit/editor-prosemirror/model");
11
11
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
12
  var _analytics = require("../analytics");
14
13
  var _utilities = require("../nesting/utilities");
15
14
  var _privacyFilter = require("./filter/privacy-filter");
@@ -58,7 +57,7 @@ function processRawValueWithoutValidation(schema, value, dispatchAnalyticsEvent)
58
57
  if (typeof value === 'string') {
59
58
  try {
60
59
  node = JSON.parse(value);
61
- } catch (e) {
60
+ } catch (_unused) {
62
61
  // eslint-disable-next-line no-console
63
62
  console.error("Error processing value: ".concat(value, " isn't a valid JSON"));
64
63
  return;
@@ -91,7 +90,7 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
91
90
  } else {
92
91
  node = JSON.parse(value);
93
92
  }
94
- } catch (e) {
93
+ } catch (_unused2) {
95
94
  // eslint-disable-next-line no-console
96
95
  console.error("Error processing value: ".concat(value, " isn't a valid JSON"));
97
96
  return;
@@ -231,25 +230,18 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
231
230
  });
232
231
  }
233
232
  }
234
- var entity;
235
- if ((0, _expValEquals.expValEquals)('platform_editor_ssr_renderer', 'isEnabled', true)) {
236
- // Validate ADF first before converting nested-table extensions into nested tables
237
- // This matches the renderer's behavior in render-document.ts
238
- var allowNestedTables = (0, _utilities.isNestedTablesSupported)(schema);
239
- entity = (0, _validateUsingSpec.validateADFEntity)(schema, transformedAdf || node, dispatchAnalyticsEvent, allowNestedTables ? {
240
- allowNestedTables: allowNestedTables
241
- } : undefined);
242
233
 
243
- // Convert nested-table extensions into nested tables
244
- var _transformNestedTable3 = transformNestedTablesWithAnalytics(entity, dispatchAnalyticsEvent);
245
- transformedAdf = _transformNestedTable3.transformedAdf;
246
- entity = transformedAdf;
247
- } else {
248
- // Convert nested-table extensions into nested tables
249
- var _transformNestedTable4 = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent);
250
- transformedAdf = _transformNestedTable4.transformedAdf;
251
- entity = (0, _validateUsingSpec.validateADFEntity)(schema, transformedAdf || node, dispatchAnalyticsEvent);
252
- }
234
+ // Validate ADF first before converting nested-table extensions into nested tables
235
+ // This matches the renderer's behavior in render-document.ts
236
+ var allowNestedTables = (0, _utilities.isNestedTablesSupported)(schema);
237
+ var entity = (0, _validateUsingSpec.validateADFEntity)(schema, transformedAdf || node, dispatchAnalyticsEvent, allowNestedTables ? {
238
+ allowNestedTables: allowNestedTables
239
+ } : undefined);
240
+
241
+ // Convert nested-table extensions into nested tables
242
+ var _transformNestedTable3 = transformNestedTablesWithAnalytics(entity, dispatchAnalyticsEvent);
243
+ transformedAdf = _transformNestedTable3.transformedAdf;
244
+ entity = transformedAdf;
253
245
  var newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
254
246
  var parsedDoc = _model.Node.fromJSON(schema, newEntity);
255
247
 
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "111.25.1";
7
+ const packageVersion = "111.27.0";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "111.25.1";
17
+ const packageVersion = "111.27.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,7 +1,6 @@
1
1
  import { syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth } from '@atlaskit/adf-utils/transforms';
2
2
  import { Fragment, Node } from '@atlaskit/editor-prosemirror/model';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
6
5
  import { isNestedTablesSupported } from '../nesting/utilities';
7
6
  import { sanitizeNodeForPrivacy } from './filter/privacy-filter';
@@ -51,7 +50,7 @@ export function processRawValueWithoutValidation(schema, value, dispatchAnalytic
51
50
  if (typeof value === 'string') {
52
51
  try {
53
52
  node = JSON.parse(value);
54
- } catch (e) {
53
+ } catch {
55
54
  // eslint-disable-next-line no-console
56
55
  console.error(`Error processing value: ${value} isn't a valid JSON`);
57
56
  return;
@@ -85,7 +84,7 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
85
84
  } else {
86
85
  node = JSON.parse(value);
87
86
  }
88
- } catch (e) {
87
+ } catch {
89
88
  // eslint-disable-next-line no-console
90
89
  console.error(`Error processing value: ${value} isn't a valid JSON`);
91
90
  return;
@@ -230,27 +229,19 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
230
229
  });
231
230
  }
232
231
  }
233
- let entity;
234
- if (expValEquals('platform_editor_ssr_renderer', 'isEnabled', true)) {
235
- // Validate ADF first before converting nested-table extensions into nested tables
236
- // This matches the renderer's behavior in render-document.ts
237
- const allowNestedTables = isNestedTablesSupported(schema);
238
- entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent, allowNestedTables ? {
239
- allowNestedTables
240
- } : undefined);
241
232
 
242
- // Convert nested-table extensions into nested tables
243
- ({
244
- transformedAdf
245
- } = transformNestedTablesWithAnalytics(entity, dispatchAnalyticsEvent));
246
- entity = transformedAdf;
247
- } else {
248
- // Convert nested-table extensions into nested tables
249
- ({
250
- transformedAdf
251
- } = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent));
252
- entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent);
253
- }
233
+ // Validate ADF first before converting nested-table extensions into nested tables
234
+ // This matches the renderer's behavior in render-document.ts
235
+ const allowNestedTables = isNestedTablesSupported(schema);
236
+ let entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent, allowNestedTables ? {
237
+ allowNestedTables
238
+ } : undefined);
239
+
240
+ // Convert nested-table extensions into nested tables
241
+ ({
242
+ transformedAdf
243
+ } = transformNestedTablesWithAnalytics(entity, dispatchAnalyticsEvent));
244
+ entity = transformedAdf;
254
245
  const newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
255
246
  const parsedDoc = Node.fromJSON(schema, newEntity);
256
247
 
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "111.25.1";
13
+ var packageVersion = "111.27.0";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "111.25.1";
24
+ var packageVersion = "111.27.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,7 +1,6 @@
1
1
  import { syncBlockFallbackTransform, transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks, transformMediaSingleWidth } from '@atlaskit/adf-utils/transforms';
2
2
  import { Fragment, Node } from '@atlaskit/editor-prosemirror/model';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
6
5
  import { isNestedTablesSupported } from '../nesting/utilities';
7
6
  import { sanitizeNodeForPrivacy } from './filter/privacy-filter';
@@ -50,7 +49,7 @@ export function processRawValueWithoutValidation(schema, value, dispatchAnalytic
50
49
  if (typeof value === 'string') {
51
50
  try {
52
51
  node = JSON.parse(value);
53
- } catch (e) {
52
+ } catch (_unused) {
54
53
  // eslint-disable-next-line no-console
55
54
  console.error("Error processing value: ".concat(value, " isn't a valid JSON"));
56
55
  return;
@@ -83,7 +82,7 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
83
82
  } else {
84
83
  node = JSON.parse(value);
85
84
  }
86
- } catch (e) {
85
+ } catch (_unused2) {
87
86
  // eslint-disable-next-line no-console
88
87
  console.error("Error processing value: ".concat(value, " isn't a valid JSON"));
89
88
  return;
@@ -223,25 +222,18 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
223
222
  });
224
223
  }
225
224
  }
226
- var entity;
227
- if (expValEquals('platform_editor_ssr_renderer', 'isEnabled', true)) {
228
- // Validate ADF first before converting nested-table extensions into nested tables
229
- // This matches the renderer's behavior in render-document.ts
230
- var allowNestedTables = isNestedTablesSupported(schema);
231
- entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent, allowNestedTables ? {
232
- allowNestedTables: allowNestedTables
233
- } : undefined);
234
225
 
235
- // Convert nested-table extensions into nested tables
236
- var _transformNestedTable3 = transformNestedTablesWithAnalytics(entity, dispatchAnalyticsEvent);
237
- transformedAdf = _transformNestedTable3.transformedAdf;
238
- entity = transformedAdf;
239
- } else {
240
- // Convert nested-table extensions into nested tables
241
- var _transformNestedTable4 = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent);
242
- transformedAdf = _transformNestedTable4.transformedAdf;
243
- entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent);
244
- }
226
+ // Validate ADF first before converting nested-table extensions into nested tables
227
+ // This matches the renderer's behavior in render-document.ts
228
+ var allowNestedTables = isNestedTablesSupported(schema);
229
+ var entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent, allowNestedTables ? {
230
+ allowNestedTables: allowNestedTables
231
+ } : undefined);
232
+
233
+ // Convert nested-table extensions into nested tables
234
+ var _transformNestedTable3 = transformNestedTablesWithAnalytics(entity, dispatchAnalyticsEvent);
235
+ transformedAdf = _transformNestedTable3.transformedAdf;
236
+ entity = transformedAdf;
245
237
  var newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
246
238
  var parsedDoc = Node.fromJSON(schema, newEntity);
247
239
 
@@ -5,7 +5,7 @@ import type { TypeAheadItem } from '../types/type-ahead';
5
5
  export type QuickInsertActionInsert = (node?: Node | Record<string, any> | string, opts?: {
6
6
  selectInlineNode?: boolean;
7
7
  }) => Transaction;
8
- export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout' | 'syncBlock';
8
+ export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout' | 'syncBlock' | 'aiSpeechToText';
9
9
  export type QuickInsertItem = TypeAheadItem & {
10
10
  /**
11
11
  * What to do on insert
@@ -5,7 +5,7 @@ import type { TypeAheadItem } from '../types/type-ahead';
5
5
  export type QuickInsertActionInsert = (node?: Node | Record<string, any> | string, opts?: {
6
6
  selectInlineNode?: boolean;
7
7
  }) => Transaction;
8
- export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout' | 'syncBlock';
8
+ export type QuickInsertItemId = 'hyperlink' | 'table' | 'helpdialog' | 'date' | 'media' | 'media-insert' | 'blockquote' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'codeblock' | 'unorderedList' | 'feedbackdialog' | 'orderedList' | 'rule' | 'status' | 'mention' | 'emoji' | 'action' | 'decision' | 'infopanel' | 'notepanel' | 'successpanel' | 'warningpanel' | 'errorpanel' | 'custompanel' | 'layout' | 'expand' | 'placeholderText' | 'datasource' | 'loom' | 'onecolumnlayout' | 'twocolumnslayout' | 'threecolumnslayout' | 'fourcolumnslayout' | 'fivecolumnslayout' | 'syncBlock' | 'aiSpeechToText';
9
9
  export type QuickInsertItem = TypeAheadItem & {
10
10
  /**
11
11
  * What to do on insert
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "111.26.0",
3
+ "version": "111.28.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/"
@@ -71,7 +71,7 @@
71
71
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
72
72
  "@atlaskit/popper": "^7.1.0",
73
73
  "@atlaskit/primitives": "^18.0.0",
74
- "@atlaskit/profilecard": "^24.39.0",
74
+ "@atlaskit/profilecard": "^24.40.0",
75
75
  "@atlaskit/prosemirror-history": "^0.2.0",
76
76
  "@atlaskit/react-ufo": "^5.4.0",
77
77
  "@atlaskit/section-message": "^8.12.0",
@@ -82,7 +82,7 @@
82
82
  "@atlaskit/task-decision": "^19.3.0",
83
83
  "@atlaskit/textfield": "^8.2.0",
84
84
  "@atlaskit/theme": "^22.0.0",
85
- "@atlaskit/tmp-editor-statsig": "^33.0.0",
85
+ "@atlaskit/tmp-editor-statsig": "^33.2.0",
86
86
  "@atlaskit/tokens": "^11.0.0",
87
87
  "@atlaskit/tooltip": "^20.14.0",
88
88
  "@atlaskit/width-detector": "^5.0.0",