@atlaskit/editor-common 112.14.0 → 112.15.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 +12 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/transforms/index.js +6 -0
- package/dist/cjs/transforms/list-transforms.js +20 -8
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/transforms/index.js +1 -1
- package/dist/es2019/transforms/list-transforms.js +19 -6
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/transforms/index.js +1 -1
- package/dist/esm/transforms/list-transforms.js +19 -7
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/ai-unified-events.d.ts +8 -0
- package/dist/types/transforms/index.d.ts +1 -1
- package/dist/types/transforms/list-transforms.d.ts +8 -1
- package/dist/types-ts4.5/analytics/types/ai-unified-events.d.ts +8 -0
- package/dist/types-ts4.5/transforms/index.d.ts +1 -1
- package/dist/types-ts4.5/transforms/list-transforms.d.ts +8 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1c4534dc921e6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c4534dc921e6) -
|
|
8
|
+
Preserve small text formatting when converting selections to task lists across block menu, block
|
|
9
|
+
type, and paste flows
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 112.14.0
|
|
4
16
|
|
|
5
17
|
### 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 = "112.
|
|
22
|
+
var packageVersion = "112.14.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "convertBlockToInlineContent", {
|
|
|
9
9
|
return _listUtils.convertBlockToInlineContent;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "createBlockTaskItem", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _listTransforms.createBlockTaskItem;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "findCodeBlock", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function get() {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.transformToTaskList = exports.transformTaskListToBlockNodes = exports.transformListStructure = exports.transformListRecursively = exports.transformBetweenListTypes = exports.getFormattedNode = void 0;
|
|
7
|
+
exports.transformToTaskList = exports.transformTaskListToBlockNodes = exports.transformListStructure = exports.transformListRecursively = exports.transformBetweenListTypes = exports.getFormattedNode = exports.createBlockTaskItem = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
@@ -25,15 +25,18 @@ var getContentSupportChecker = function getContentSupportChecker(targetNodeType)
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
var
|
|
28
|
+
var createBlockTaskItem = exports.createBlockTaskItem = function createBlockTaskItem(_ref) {
|
|
29
|
+
var attrs = _ref.attrs,
|
|
30
|
+
content = _ref.content,
|
|
31
|
+
marks = _ref.marks,
|
|
32
|
+
schema = _ref.schema;
|
|
29
33
|
var _schema$nodes = schema.nodes,
|
|
30
34
|
blockTaskItem = _schema$nodes.blockTaskItem,
|
|
31
35
|
paragraph = _schema$nodes.paragraph;
|
|
32
|
-
var
|
|
36
|
+
var newParagraph = paragraph.createChecked(null, content, marks === null || marks === void 0 ? void 0 : marks.filter(function (mark) {
|
|
33
37
|
return blockTaskItem.allowsMarkType(mark.type);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
return blockTaskItem.create(null, newParagraph);
|
|
38
|
+
}));
|
|
39
|
+
return blockTaskItem.create(attrs !== null && attrs !== void 0 ? attrs : null, newParagraph);
|
|
37
40
|
};
|
|
38
41
|
var _transformListRecursively = exports.transformListRecursively = function transformListRecursively(props, onhandleUnsupportedContent) {
|
|
39
42
|
var transformedItems = [];
|
|
@@ -90,7 +93,11 @@ var _transformListRecursively = exports.transformListRecursively = function tran
|
|
|
90
93
|
}
|
|
91
94
|
});
|
|
92
95
|
if (isBlockTaskEnabled && blockMarks.length > 0) {
|
|
93
|
-
transformedItems.push(
|
|
96
|
+
transformedItems.push(createBlockTaskItem({
|
|
97
|
+
content: inlineContent,
|
|
98
|
+
marks: blockMarks,
|
|
99
|
+
schema: schema
|
|
100
|
+
}));
|
|
94
101
|
} else {
|
|
95
102
|
transformedItems.push(taskItem.create(null, inlineContent.length > 0 ? inlineContent : null));
|
|
96
103
|
}
|
|
@@ -263,7 +270,12 @@ var transformToTaskList = exports.transformToTaskList = function transformToTask
|
|
|
263
270
|
var inlineContent = (0, _toConsumableArray2.default)(node.content.content);
|
|
264
271
|
if (inlineContent.length > 0) {
|
|
265
272
|
if (isBlockTaskItemEnabled && node.type === paragraph && node.marks.length > 0) {
|
|
266
|
-
listItems.push(
|
|
273
|
+
listItems.push(createBlockTaskItem({
|
|
274
|
+
attrs: targetAttrs,
|
|
275
|
+
content: inlineContent,
|
|
276
|
+
marks: node.marks,
|
|
277
|
+
schema: tr.doc.type.schema
|
|
278
|
+
}));
|
|
267
279
|
} else {
|
|
268
280
|
listItems.push(taskItem.create(targetAttrs, inlineContent));
|
|
269
281
|
}
|
|
@@ -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 = "112.
|
|
27
|
+
var packageVersion = "112.14.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -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 = "112.
|
|
7
|
+
const packageVersion = "112.14.0";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -6,6 +6,6 @@ export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpe
|
|
|
6
6
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId } from './extension';
|
|
7
7
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock } from './code-block';
|
|
8
8
|
export { transformSliceToDecisionList } from './decision-list';
|
|
9
|
-
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
9
|
+
export { createBlockTaskItem, transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
10
10
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
|
|
11
11
|
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
@@ -11,14 +11,18 @@ const getContentSupportChecker = targetNodeType => {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
const
|
|
14
|
+
export const createBlockTaskItem = ({
|
|
15
|
+
attrs,
|
|
16
|
+
content,
|
|
17
|
+
marks,
|
|
18
|
+
schema
|
|
19
|
+
}) => {
|
|
15
20
|
const {
|
|
16
21
|
blockTaskItem,
|
|
17
22
|
paragraph
|
|
18
23
|
} = schema.nodes;
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
return blockTaskItem.create(null, newParagraph);
|
|
24
|
+
const newParagraph = paragraph.createChecked(null, content, marks === null || marks === void 0 ? void 0 : marks.filter(mark => blockTaskItem.allowsMarkType(mark.type)));
|
|
25
|
+
return blockTaskItem.create(attrs !== null && attrs !== void 0 ? attrs : null, newParagraph);
|
|
22
26
|
};
|
|
23
27
|
export const transformListRecursively = (props, onhandleUnsupportedContent) => {
|
|
24
28
|
const transformedItems = [];
|
|
@@ -79,7 +83,11 @@ export const transformListRecursively = (props, onhandleUnsupportedContent) => {
|
|
|
79
83
|
}
|
|
80
84
|
});
|
|
81
85
|
if (isBlockTaskEnabled && blockMarks.length > 0) {
|
|
82
|
-
transformedItems.push(
|
|
86
|
+
transformedItems.push(createBlockTaskItem({
|
|
87
|
+
content: inlineContent,
|
|
88
|
+
marks: blockMarks,
|
|
89
|
+
schema
|
|
90
|
+
}));
|
|
83
91
|
} else {
|
|
84
92
|
transformedItems.push(taskItem.create(null, inlineContent.length > 0 ? inlineContent : null));
|
|
85
93
|
}
|
|
@@ -262,7 +270,12 @@ export const transformToTaskList = (tr, range, targetNodeType, targetAttrs, node
|
|
|
262
270
|
const inlineContent = [...node.content.content];
|
|
263
271
|
if (inlineContent.length > 0) {
|
|
264
272
|
if (isBlockTaskItemEnabled && node.type === paragraph && node.marks.length > 0) {
|
|
265
|
-
listItems.push(
|
|
273
|
+
listItems.push(createBlockTaskItem({
|
|
274
|
+
attrs: targetAttrs,
|
|
275
|
+
content: inlineContent,
|
|
276
|
+
marks: node.marks,
|
|
277
|
+
schema: tr.doc.type.schema
|
|
278
|
+
}));
|
|
266
279
|
} else {
|
|
267
280
|
listItems.push(taskItem.create(targetAttrs, inlineContent));
|
|
268
281
|
}
|
|
@@ -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 = "112.
|
|
17
|
+
const packageVersion = "112.14.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -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 = "112.
|
|
13
|
+
var packageVersion = "112.14.0";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -6,6 +6,6 @@ export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpe
|
|
|
6
6
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId } from './extension';
|
|
7
7
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock } from './code-block';
|
|
8
8
|
export { transformSliceToDecisionList } from './decision-list';
|
|
9
|
-
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
9
|
+
export { createBlockTaskItem, transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode } from './list-transforms';
|
|
10
10
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent } from './list-utils';
|
|
11
11
|
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
@@ -18,15 +18,18 @@ var getContentSupportChecker = function getContentSupportChecker(targetNodeType)
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
var
|
|
21
|
+
export var createBlockTaskItem = function createBlockTaskItem(_ref) {
|
|
22
|
+
var attrs = _ref.attrs,
|
|
23
|
+
content = _ref.content,
|
|
24
|
+
marks = _ref.marks,
|
|
25
|
+
schema = _ref.schema;
|
|
22
26
|
var _schema$nodes = schema.nodes,
|
|
23
27
|
blockTaskItem = _schema$nodes.blockTaskItem,
|
|
24
28
|
paragraph = _schema$nodes.paragraph;
|
|
25
|
-
var
|
|
29
|
+
var newParagraph = paragraph.createChecked(null, content, marks === null || marks === void 0 ? void 0 : marks.filter(function (mark) {
|
|
26
30
|
return blockTaskItem.allowsMarkType(mark.type);
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
return blockTaskItem.create(null, newParagraph);
|
|
31
|
+
}));
|
|
32
|
+
return blockTaskItem.create(attrs !== null && attrs !== void 0 ? attrs : null, newParagraph);
|
|
30
33
|
};
|
|
31
34
|
var _transformListRecursively = function transformListRecursively(props, onhandleUnsupportedContent) {
|
|
32
35
|
var transformedItems = [];
|
|
@@ -83,7 +86,11 @@ var _transformListRecursively = function transformListRecursively(props, onhandl
|
|
|
83
86
|
}
|
|
84
87
|
});
|
|
85
88
|
if (isBlockTaskEnabled && blockMarks.length > 0) {
|
|
86
|
-
transformedItems.push(
|
|
89
|
+
transformedItems.push(createBlockTaskItem({
|
|
90
|
+
content: inlineContent,
|
|
91
|
+
marks: blockMarks,
|
|
92
|
+
schema: schema
|
|
93
|
+
}));
|
|
87
94
|
} else {
|
|
88
95
|
transformedItems.push(taskItem.create(null, inlineContent.length > 0 ? inlineContent : null));
|
|
89
96
|
}
|
|
@@ -257,7 +264,12 @@ export var transformToTaskList = function transformToTaskList(tr, range, targetN
|
|
|
257
264
|
var inlineContent = _toConsumableArray(node.content.content);
|
|
258
265
|
if (inlineContent.length > 0) {
|
|
259
266
|
if (isBlockTaskItemEnabled && node.type === paragraph && node.marks.length > 0) {
|
|
260
|
-
listItems.push(
|
|
267
|
+
listItems.push(createBlockTaskItem({
|
|
268
|
+
attrs: targetAttrs,
|
|
269
|
+
content: inlineContent,
|
|
270
|
+
marks: node.marks,
|
|
271
|
+
schema: tr.doc.type.schema
|
|
272
|
+
}));
|
|
261
273
|
} else {
|
|
262
274
|
listItems.push(taskItem.create(targetAttrs, inlineContent));
|
|
263
275
|
}
|
|
@@ -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 = "112.
|
|
24
|
+
var packageVersion = "112.14.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -8,6 +8,10 @@ export type AIUnifiedCommonAttributes = {
|
|
|
8
8
|
aiExperienceName?: string;
|
|
9
9
|
aiFeatureName: string;
|
|
10
10
|
aiInteractionID: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not the AI experience is from a 3p product when user invokes AI action from smartlink toolbar.
|
|
13
|
+
*/
|
|
14
|
+
has3pSources?: boolean;
|
|
11
15
|
invokedFrom?: string;
|
|
12
16
|
isAIFeature: 1;
|
|
13
17
|
/**
|
|
@@ -24,6 +28,10 @@ export type AIUnifiedCommonAttributes = {
|
|
|
24
28
|
proactiveAIGenerated: 0 | 1;
|
|
25
29
|
promptVersion?: string;
|
|
26
30
|
singleInstrumentationID: string;
|
|
31
|
+
/**
|
|
32
|
+
* The source 3p product when user invokes AI action from smartlink toolbar.
|
|
33
|
+
*/
|
|
34
|
+
sourceProducts?: string | null;
|
|
27
35
|
traceIds?: string[];
|
|
28
36
|
userGeneratedAI: 0 | 1;
|
|
29
37
|
};
|
|
@@ -3,7 +3,7 @@ export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpe
|
|
|
3
3
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, } from './extension';
|
|
4
4
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock, } from './code-block';
|
|
5
5
|
export { transformSliceToDecisionList } from './decision-list';
|
|
6
|
-
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
6
|
+
export { createBlockTaskItem, transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
7
7
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent, } from './list-utils';
|
|
8
8
|
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
9
9
|
export type { TransformContext, TransformFunction } from './list-types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Mark, NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { TransformContext } from './list-types';
|
|
4
5
|
type TransformListRecursivelyProps = {
|
|
@@ -11,6 +12,12 @@ type TransformListRecursivelyProps = {
|
|
|
11
12
|
supportedListTypes: Set<NodeType>;
|
|
12
13
|
targetNodeType: NodeType;
|
|
13
14
|
};
|
|
15
|
+
export declare const createBlockTaskItem: ({ attrs, content, marks, schema, }: {
|
|
16
|
+
attrs?: Record<string, unknown> | null;
|
|
17
|
+
content: PMNode[] | Fragment;
|
|
18
|
+
marks?: readonly Mark[];
|
|
19
|
+
schema: Schema;
|
|
20
|
+
}) => PMNode;
|
|
14
21
|
export declare const transformListRecursively: (props: TransformListRecursivelyProps, onhandleUnsupportedContent?: (content: PMNode) => void) => PMNode;
|
|
15
22
|
/**
|
|
16
23
|
* Transform list structure between different list types
|
|
@@ -8,6 +8,10 @@ export type AIUnifiedCommonAttributes = {
|
|
|
8
8
|
aiExperienceName?: string;
|
|
9
9
|
aiFeatureName: string;
|
|
10
10
|
aiInteractionID: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not the AI experience is from a 3p product when user invokes AI action from smartlink toolbar.
|
|
13
|
+
*/
|
|
14
|
+
has3pSources?: boolean;
|
|
11
15
|
invokedFrom?: string;
|
|
12
16
|
isAIFeature: 1;
|
|
13
17
|
/**
|
|
@@ -24,6 +28,10 @@ export type AIUnifiedCommonAttributes = {
|
|
|
24
28
|
proactiveAIGenerated: 0 | 1;
|
|
25
29
|
promptVersion?: string;
|
|
26
30
|
singleInstrumentationID: string;
|
|
31
|
+
/**
|
|
32
|
+
* The source 3p product when user invokes AI action from smartlink toolbar.
|
|
33
|
+
*/
|
|
34
|
+
sourceProducts?: string | null;
|
|
27
35
|
traceIds?: string[];
|
|
28
36
|
userGeneratedAI: 0 | 1;
|
|
29
37
|
};
|
|
@@ -3,7 +3,7 @@ export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpe
|
|
|
3
3
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, } from './extension';
|
|
4
4
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock, } from './code-block';
|
|
5
5
|
export { transformSliceToDecisionList } from './decision-list';
|
|
6
|
-
export { transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
6
|
+
export { createBlockTaskItem, transformListStructure, transformBetweenListTypes, transformListRecursively, transformToTaskList, transformTaskListToBlockNodes, getFormattedNode, } from './list-transforms';
|
|
7
7
|
export { isBulletOrOrderedList, isTaskList, getSupportedListTypesSet, convertBlockToInlineContent, } from './list-utils';
|
|
8
8
|
export { removeBreakoutFromRendererSyncBlockHTML } from './sync-block';
|
|
9
9
|
export type { TransformContext, TransformFunction } from './list-types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Mark, NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { TransformContext } from './list-types';
|
|
4
5
|
type TransformListRecursivelyProps = {
|
|
@@ -11,6 +12,12 @@ type TransformListRecursivelyProps = {
|
|
|
11
12
|
supportedListTypes: Set<NodeType>;
|
|
12
13
|
targetNodeType: NodeType;
|
|
13
14
|
};
|
|
15
|
+
export declare const createBlockTaskItem: ({ attrs, content, marks, schema, }: {
|
|
16
|
+
attrs?: Record<string, unknown> | null;
|
|
17
|
+
content: PMNode[] | Fragment;
|
|
18
|
+
marks?: readonly Mark[];
|
|
19
|
+
schema: Schema;
|
|
20
|
+
}) => PMNode;
|
|
14
21
|
export declare const transformListRecursively: (props: TransformListRecursivelyProps, onhandleUnsupportedContent?: (content: PMNode) => void) => PMNode;
|
|
15
22
|
/**
|
|
16
23
|
* Transform list structure between different list types
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.
|
|
3
|
+
"version": "112.15.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/"
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
"@atlaskit/primitives": "^18.1.0",
|
|
74
74
|
"@atlaskit/profilecard": "^24.46.0",
|
|
75
75
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
76
|
-
"@atlaskit/react-ufo": "^5.
|
|
76
|
+
"@atlaskit/react-ufo": "^5.10.0",
|
|
77
77
|
"@atlaskit/section-message": "^8.12.0",
|
|
78
78
|
"@atlaskit/smart-card": "^43.29.0",
|
|
79
79
|
"@atlaskit/smart-user-picker": "^9.2.0",
|
|
80
80
|
"@atlaskit/spinner": "^19.0.0",
|
|
81
81
|
"@atlaskit/task-decision": "^19.3.0",
|
|
82
82
|
"@atlaskit/textfield": "^8.2.0",
|
|
83
|
-
"@atlaskit/tmp-editor-statsig": "^52.
|
|
83
|
+
"@atlaskit/tmp-editor-statsig": "^52.1.0",
|
|
84
84
|
"@atlaskit/tokens": "^11.4.0",
|
|
85
85
|
"@atlaskit/tooltip": "^21.1.0",
|
|
86
86
|
"@atlaskit/width-detector": "^5.0.0",
|