@atlaskit/editor-common 122.5.0 → 122.6.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 +43 -0
- package/collab-agent-edit-changed-ranges/package.json +10 -0
- package/dist/cjs/collab/agent-edit-changed-ranges.js +304 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/preset/core-plugin/index.js +7 -14
- package/dist/cjs/transforms/getFormattedNode.js +1 -5
- package/dist/cjs/transforms/list-transforms.js +2 -8
- package/dist/cjs/transforms/transformTaskListToBlockNodes.js +1 -5
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/collab/agent-edit-changed-ranges.js +255 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/core-plugin/index.js +5 -12
- package/dist/es2019/transforms/getFormattedNode.js +1 -5
- package/dist/es2019/transforms/list-transforms.js +2 -8
- package/dist/es2019/transforms/transformTaskListToBlockNodes.js +1 -5
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/collab/agent-edit-changed-ranges.js +297 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/core-plugin/index.js +7 -14
- package/dist/esm/transforms/getFormattedNode.js +1 -5
- package/dist/esm/transforms/list-transforms.js +2 -8
- package/dist/esm/transforms/transformTaskListToBlockNodes.js +1 -5
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/collab/agent-edit-changed-ranges.d.ts +12 -0
- package/dist/types/provider-factory/profile-card-provider.d.ts +5 -0
- package/package.json +3 -3
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
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 = "122.
|
|
22
|
+
var packageVersion = "122.6.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
3
|
import { getNodeIdProvider } from '../../node-anchor/node-anchor-provider';
|
|
5
4
|
import { processRawFragmentValue } from '../../utils/processRawFragmentValue';
|
|
6
5
|
import { processRawValue, processRawValueWithoutValidation } from '../../utils/processRawValue';
|
|
@@ -23,19 +22,16 @@ export var corePlugin = function corePlugin(_ref) {
|
|
|
23
22
|
var pluginState = state && appearancePluginKey.getState(state);
|
|
24
23
|
return {
|
|
25
24
|
schema: state === null || state === void 0 ? void 0 : state.schema,
|
|
26
|
-
appearance:
|
|
25
|
+
appearance: pluginState === null || pluginState === void 0 ? void 0 : pluginState.appearance
|
|
27
26
|
};
|
|
28
27
|
},
|
|
29
28
|
pmPlugins: function pmPlugins() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}];
|
|
37
|
-
}
|
|
38
|
-
return [];
|
|
29
|
+
return [{
|
|
30
|
+
name: 'appearancePlugin',
|
|
31
|
+
plugin: function plugin() {
|
|
32
|
+
return createAppearancePlugin(config === null || config === void 0 ? void 0 : config.appearance);
|
|
33
|
+
}
|
|
34
|
+
}];
|
|
39
35
|
},
|
|
40
36
|
actions: {
|
|
41
37
|
execute: function execute(command) {
|
|
@@ -110,9 +106,6 @@ export var corePlugin = function corePlugin(_ref) {
|
|
|
110
106
|
},
|
|
111
107
|
updateAppearance: function updateAppearance(newAppearance) {
|
|
112
108
|
var _appearancePluginKey$;
|
|
113
|
-
if (!expValEquals('platform_editor_appearance_shared_state', 'isEnabled', true)) {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
109
|
var editorView = config === null || config === void 0 ? void 0 : config.getEditorView();
|
|
117
110
|
if (!editorView) {
|
|
118
111
|
return false;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
2
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
2
|
export var getFormattedNode = function getFormattedNode(tr) {
|
|
4
3
|
var selection = tr.selection;
|
|
5
4
|
var nodes = tr.doc.type.schema.nodes;
|
|
6
|
-
|
|
7
|
-
// gating behind platform_editor_small_font_size to support task lists with font size applied,
|
|
8
|
-
// but keep this solution general
|
|
9
|
-
var isBlockTaskItemEnabled = !!nodes.blockTaskItem && expValEquals('platform_editor_small_font_size', 'isEnabled', true);
|
|
5
|
+
var isBlockTaskItemEnabled = !!nodes.blockTaskItem;
|
|
10
6
|
|
|
11
7
|
// Find the node to format from the current selection
|
|
12
8
|
var nodeToFormat;
|
|
@@ -3,7 +3,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
6
|
import { convertBlockToInlineContent } from './convertBlockToInlineContent';
|
|
8
7
|
import { createBlockTaskItem } from './createBlockTaskItem';
|
|
9
8
|
import { isBulletOrOrderedList } from './isBulletOrOrderedList';
|
|
@@ -35,10 +34,7 @@ var _transformListRecursively = function transformListRecursively(props, onhandl
|
|
|
35
34
|
taskItem = _schema$nodes.taskItem,
|
|
36
35
|
paragraph = _schema$nodes.paragraph,
|
|
37
36
|
blockTaskItem = _schema$nodes.blockTaskItem;
|
|
38
|
-
|
|
39
|
-
// gating behind platform_editor_small_font_size to support task lists with font size applied,
|
|
40
|
-
// but keep this solution general
|
|
41
|
-
var isBlockTaskEnabled = !!blockTaskItem && expValEquals('platform_editor_small_font_size', 'isEnabled', true);
|
|
37
|
+
var isBlockTaskEnabled = !!blockTaskItem;
|
|
42
38
|
|
|
43
39
|
/**
|
|
44
40
|
* Extracts paragraph children from a blockTaskItem, preserving their marks.
|
|
@@ -199,9 +195,7 @@ export var transformToTaskList = function transformToTaskList(tr, range, targetN
|
|
|
199
195
|
var taskItem = nodes.taskItem,
|
|
200
196
|
paragraph = nodes.paragraph,
|
|
201
197
|
blockTaskItem = nodes.blockTaskItem;
|
|
202
|
-
|
|
203
|
-
// but keep this solution general
|
|
204
|
-
var isBlockTaskItemEnabled = !!blockTaskItem && expValEquals('platform_editor_small_font_size', 'isEnabled', true);
|
|
198
|
+
var isBlockTaskItemEnabled = !!blockTaskItem;
|
|
205
199
|
var listItems = [];
|
|
206
200
|
|
|
207
201
|
// Process each block in the range
|
|
@@ -3,7 +3,6 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
3
3
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
4
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
6
|
export var transformTaskListToBlockNodes = function transformTaskListToBlockNodes(context) {
|
|
8
7
|
var tr = context.tr,
|
|
9
8
|
targetNodeType = context.targetNodeType,
|
|
@@ -13,10 +12,7 @@ export var transformTaskListToBlockNodes = function transformTaskListToBlockNode
|
|
|
13
12
|
var selection = tr.selection;
|
|
14
13
|
var schema = selection.$from.doc.type.schema;
|
|
15
14
|
var blockTaskItem = schema.nodes.blockTaskItem;
|
|
16
|
-
|
|
17
|
-
// gating behind platform_editor_small_font_size to support task lists with font size applied,
|
|
18
|
-
// but keep this solution general
|
|
19
|
-
var isBlockTaskItemEnabled = !!blockTaskItem && expValEquals('platform_editor_small_font_size', 'isEnabled', true);
|
|
15
|
+
var isBlockTaskItemEnabled = !!blockTaskItem;
|
|
20
16
|
if (isBlockTaskItemEnabled) {
|
|
21
17
|
var blockTaskItemsResult = findChildrenByType(sourceNode, blockTaskItem);
|
|
22
18
|
if (blockTaskItemsResult.length > 0 && targetNodeType === schema.nodes.paragraph) {
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "122.
|
|
24
|
+
var packageVersion = "122.6.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { AgentEditChromeRange } from './agent-edit-chrome';
|
|
3
|
+
/**
|
|
4
|
+
* Returns whole content-block ranges for selected applied steps, in tr.doc coordinates.
|
|
5
|
+
* Callers select actual AI writes (excluding restores, acknowledgments and preparation)
|
|
6
|
+
* and own experiment/lifecycle decisions. This helper does not dispatch or render.
|
|
7
|
+
*
|
|
8
|
+
* Comparing each step's snapshots also handles attribute/mark steps with empty maps.
|
|
9
|
+
* Shared unchanged subtrees are skipped by reference. Only localId changes are ignored;
|
|
10
|
+
* meaningful attributes and marks retain the affected node's full content scope.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getAgentEditChangedRanges(tr: Transaction, includedStepIndexes: readonly number[]): AgentEditChromeRange[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Placement } from '@atlaskit/popper/main';
|
|
2
3
|
import type { ProfileCardAction } from '@atlaskit/profilecard/types';
|
|
3
4
|
import type ProfileClient from '@atlaskit/profilecard/profile-card-client';
|
|
4
5
|
/**
|
|
@@ -16,8 +17,12 @@ import type ProfileClient from '@atlaskit/profilecard/profile-card-client';
|
|
|
16
17
|
export type RenderUserMentionCard = (props: {
|
|
17
18
|
children: ReactNode;
|
|
18
19
|
cloudId: string;
|
|
20
|
+
/** Renders a reduced, non-interactive card with the header + manager section only */
|
|
21
|
+
isReduced?: boolean;
|
|
19
22
|
/** Optional mention-local marker supplied by the renderer. */
|
|
20
23
|
localId?: string;
|
|
24
|
+
/** Popper placement for the card relative to the `referenceElement`. */
|
|
25
|
+
placement?: Placement;
|
|
21
26
|
/** Known identity to prefill the card with, giving its trigger a concrete accessible name. */
|
|
22
27
|
prefilledProfileData?: {
|
|
23
28
|
accountId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "122.
|
|
3
|
+
"version": "122.6.1",
|
|
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/"
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"@atlaskit/task-decision": "^21.10.0",
|
|
85
85
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
86
86
|
"@atlaskit/textfield": "^10.2.0",
|
|
87
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
88
|
-
"@atlaskit/tokens": "^
|
|
87
|
+
"@atlaskit/tmp-editor-statsig": "^195.0.0",
|
|
88
|
+
"@atlaskit/tokens": "^17.0.0",
|
|
89
89
|
"@atlaskit/tooltip": "^24.3.0",
|
|
90
90
|
"@atlaskit/width-detector": "^7.2.0",
|
|
91
91
|
"@babel/runtime": "^7.0.0",
|