@atlaskit/editor-common 76.33.2 → 76.35.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 +54 -0
- package/dist/cjs/collab/index.js +27 -2
- package/dist/cjs/core-utils/document-logger.js +171 -0
- package/dist/cjs/core-utils/index.js +8 -1
- package/dist/cjs/extensibility/Extension/Extension/index.js +151 -0
- package/dist/cjs/extensibility/Extension/Extension/styles.js +17 -0
- package/dist/cjs/extensibility/Extension/InlineExtension/index.js +50 -0
- package/dist/cjs/extensibility/Extension/InlineExtension/styles.js +12 -0
- package/dist/cjs/extensibility/Extension/Lozenge.js +95 -0
- package/dist/cjs/extensibility/Extension/styles.js +30 -0
- package/dist/cjs/extensibility/Extension.js +79 -0
- package/dist/cjs/extensibility/ExtensionComponent.js +252 -0
- package/dist/cjs/extensibility/ExtensionNodeWrapper.js +21 -0
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +264 -0
- package/dist/cjs/extensibility/extensionNodeView.js +91 -0
- package/dist/cjs/extensibility/index.js +42 -0
- package/dist/cjs/extensibility/types.js +5 -0
- package/dist/cjs/media-inline/media-inline-image-card.js +24 -19
- package/dist/cjs/monitoring/error.js +3 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/index.js +7 -0
- package/dist/cjs/utils/insert-node-into-ordered-list.js +91 -0
- package/dist/es2019/collab/index.js +54 -1
- package/dist/es2019/core-utils/document-logger.js +161 -0
- package/dist/es2019/core-utils/index.js +2 -1
- package/dist/es2019/extensibility/Extension/Extension/index.js +155 -0
- package/dist/es2019/extensibility/Extension/Extension/styles.js +42 -0
- package/dist/es2019/extensibility/Extension/InlineExtension/index.js +26 -0
- package/dist/es2019/extensibility/Extension/InlineExtension/styles.js +26 -0
- package/dist/es2019/extensibility/Extension/Lozenge.js +71 -0
- package/dist/es2019/extensibility/Extension/styles.js +62 -0
- package/dist/es2019/extensibility/Extension.js +52 -0
- package/dist/es2019/extensibility/ExtensionComponent.js +204 -0
- package/dist/es2019/extensibility/ExtensionNodeWrapper.js +13 -0
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +283 -0
- package/dist/es2019/extensibility/extensionNodeView.js +62 -0
- package/dist/es2019/extensibility/index.js +4 -0
- package/dist/es2019/extensibility/types.js +1 -0
- package/dist/es2019/media-inline/media-inline-image-card.js +24 -19
- package/dist/es2019/monitoring/error.js +3 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/index.js +1 -0
- package/dist/es2019/utils/insert-node-into-ordered-list.js +84 -0
- package/dist/esm/collab/index.js +23 -1
- package/dist/esm/core-utils/document-logger.js +165 -0
- package/dist/esm/core-utils/index.js +2 -1
- package/dist/esm/extensibility/Extension/Extension/index.js +146 -0
- package/dist/esm/extensibility/Extension/Extension/styles.js +10 -0
- package/dist/esm/extensibility/Extension/InlineExtension/index.js +43 -0
- package/dist/esm/extensibility/Extension/InlineExtension/styles.js +5 -0
- package/dist/esm/extensibility/Extension/Lozenge.js +90 -0
- package/dist/esm/extensibility/Extension/styles.js +11 -0
- package/dist/esm/extensibility/Extension.js +69 -0
- package/dist/esm/extensibility/ExtensionComponent.js +243 -0
- package/dist/esm/extensibility/ExtensionNodeWrapper.js +14 -0
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +257 -0
- package/dist/esm/extensibility/extensionNodeView.js +83 -0
- package/dist/esm/extensibility/index.js +4 -0
- package/dist/esm/extensibility/types.js +1 -0
- package/dist/esm/media-inline/media-inline-image-card.js +24 -19
- package/dist/esm/monitoring/error.js +3 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/insert-node-into-ordered-list.js +84 -0
- package/dist/types/collab/index.d.ts +7 -0
- package/dist/types/core-utils/document-logger.d.ts +6 -0
- package/dist/types/core-utils/index.d.ts +1 -0
- package/dist/types/extensibility/Extension/Extension/index.d.ts +108 -0
- package/dist/types/extensibility/Extension/Extension/styles.d.ts +5 -0
- package/dist/types/extensibility/Extension/InlineExtension/index.d.ts +12 -0
- package/dist/types/extensibility/Extension/InlineExtension/styles.d.ts +1 -0
- package/dist/types/extensibility/Extension/Lozenge.d.ts +14 -0
- package/dist/types/extensibility/Extension/styles.d.ts +7 -0
- package/dist/types/extensibility/Extension.d.ts +29 -0
- package/dist/types/extensibility/ExtensionComponent.d.ts +53 -0
- package/dist/types/extensibility/ExtensionNodeWrapper.d.ts +14 -0
- package/dist/types/extensibility/MultiBodiedExtension/index.d.ts +26 -0
- package/dist/types/extensibility/extensionNodeView.d.ts +31 -0
- package/dist/types/extensibility/index.d.ts +4 -0
- package/dist/types/extensibility/types.d.ts +6 -0
- package/dist/types/extensions/types/extension-handler.d.ts +2 -0
- package/dist/types/media-inline/media-inline-image-card.d.ts +3 -2
- package/dist/types/media-inline/types.d.ts +6 -2
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/next-editor-plugin.d.ts +0 -1
- package/dist/types/ui/DropList/index.d.ts +1 -1
- package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui-menu/ToolbarButton/index.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/insert-node-into-ordered-list.d.ts +3 -0
- package/dist/types-ts4.5/collab/index.d.ts +7 -0
- package/dist/types-ts4.5/core-utils/document-logger.d.ts +6 -0
- package/dist/types-ts4.5/core-utils/index.d.ts +1 -0
- package/dist/types-ts4.5/extensibility/Extension/Extension/index.d.ts +108 -0
- package/dist/types-ts4.5/extensibility/Extension/Extension/styles.d.ts +5 -0
- package/dist/types-ts4.5/extensibility/Extension/InlineExtension/index.d.ts +12 -0
- package/dist/types-ts4.5/extensibility/Extension/InlineExtension/styles.d.ts +1 -0
- package/dist/types-ts4.5/extensibility/Extension/Lozenge.d.ts +14 -0
- package/dist/types-ts4.5/extensibility/Extension/styles.d.ts +7 -0
- package/dist/types-ts4.5/extensibility/Extension.d.ts +29 -0
- package/dist/types-ts4.5/extensibility/ExtensionComponent.d.ts +53 -0
- package/dist/types-ts4.5/extensibility/ExtensionNodeWrapper.d.ts +14 -0
- package/dist/types-ts4.5/extensibility/MultiBodiedExtension/index.d.ts +26 -0
- package/dist/types-ts4.5/extensibility/extensionNodeView.d.ts +31 -0
- package/dist/types-ts4.5/extensibility/index.d.ts +4 -0
- package/dist/types-ts4.5/extensibility/types.d.ts +8 -0
- package/dist/types-ts4.5/extensions/types/extension-handler.d.ts +2 -0
- package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +3 -2
- package/dist/types-ts4.5/media-inline/types.d.ts +6 -2
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +0 -3
- package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/ToolbarButton/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/index.d.ts +1 -0
- package/dist/types-ts4.5/utils/insert-node-into-ordered-list.d.ts +3 -0
- package/extensibility/package.json +15 -0
- package/package.json +6 -5
|
@@ -19,7 +19,8 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
19
19
|
isLazy = _ref.isLazy,
|
|
20
20
|
width = _ref.width,
|
|
21
21
|
height = _ref.height,
|
|
22
|
-
border = _ref.border
|
|
22
|
+
border = _ref.border,
|
|
23
|
+
ssr = _ref.ssr;
|
|
23
24
|
var _useState = useState(),
|
|
24
25
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
26
|
fileState = _useState2[0],
|
|
@@ -33,21 +34,23 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
33
34
|
}),
|
|
34
35
|
formatMessage = _ref2.formatMessage;
|
|
35
36
|
useEffect(function () {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
if (mediaClient) {
|
|
38
|
+
var subscription = mediaClient.file.getFileState(identifier.id, {
|
|
39
|
+
collectionName: identifier.collectionName
|
|
40
|
+
}).subscribe({
|
|
41
|
+
next: function next(fileState) {
|
|
42
|
+
setFileState(fileState);
|
|
43
|
+
setSubscribeError(undefined);
|
|
44
|
+
},
|
|
45
|
+
error: function error(e) {
|
|
46
|
+
setSubscribeError(e);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return function () {
|
|
50
|
+
subscription.unsubscribe();
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}, [identifier, mediaClient]);
|
|
51
54
|
var content = function content(dimensions) {
|
|
52
55
|
if (subscribeError) {
|
|
53
56
|
var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
|
|
@@ -72,18 +75,20 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
72
75
|
message: formatMessage(messages.unableToLoadContent)
|
|
73
76
|
});
|
|
74
77
|
}
|
|
78
|
+
var mediaClientConfig = (ssr === null || ssr === void 0 ? void 0 : ssr.config) || (mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig);
|
|
75
79
|
if (!fileState) {
|
|
76
80
|
return jsx(InlineImageCardLoadingView, null);
|
|
77
81
|
}
|
|
78
82
|
return jsx(Card, {
|
|
79
|
-
mediaClientConfig:
|
|
83
|
+
mediaClientConfig: mediaClientConfig,
|
|
80
84
|
isLazy: isLazy,
|
|
81
85
|
identifier: identifier,
|
|
82
86
|
dimensions: dimensions,
|
|
83
87
|
selectable: true,
|
|
84
88
|
disableOverlay: true,
|
|
85
89
|
selected: isSelected,
|
|
86
|
-
alt: alt
|
|
90
|
+
alt: alt,
|
|
91
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
87
92
|
});
|
|
88
93
|
};
|
|
89
94
|
var aspectRatio = useMemo(function () {
|
|
@@ -92,7 +97,7 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
92
97
|
|
|
93
98
|
/**
|
|
94
99
|
* scaledDimensions is used to define the correct media size fetched from media service
|
|
95
|
-
* inline images will only ever be
|
|
100
|
+
* inline images will only ever be rendered at a maximum height of H1 and so scaled dimensions
|
|
96
101
|
* will only ever return a width and height where the height has a maximum height of H1
|
|
97
102
|
*/
|
|
98
103
|
var scaledDimension = useMemo(function () {
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
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; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "76.
|
|
9
|
+
var packageVersion = "76.35.0";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -65,13 +65,14 @@ export var logException = /*#__PURE__*/function () {
|
|
|
65
65
|
hub = getCurrentHub();
|
|
66
66
|
hub.bindClient(client);
|
|
67
67
|
hub.withScope(function (scope) {
|
|
68
|
+
var _buildInfo;
|
|
68
69
|
scope.setTags(_objectSpread({
|
|
69
70
|
// Jira environment variables
|
|
70
71
|
'jira-bundler': window.BUNDLER_VERSION,
|
|
71
72
|
'jira-variant': window.BUILD_VARIANT,
|
|
72
73
|
'jira-release': window.BUILD_KEY,
|
|
73
74
|
// Confluence environment variables
|
|
74
|
-
'confluence-frontend-version': window.__buildInfo.FRONTEND_VERSION
|
|
75
|
+
'confluence-frontend-version': (_buildInfo = window.__buildInfo) === null || _buildInfo === void 0 ? void 0 : _buildInfo.FRONTEND_VERSION
|
|
75
76
|
}, tags));
|
|
76
77
|
// Explicitly remove the breadcrumbs as it's too likely to log UGC/PII to side-step the hub integrations not being respected
|
|
77
78
|
scope.clearBreadcrumbs();
|
|
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
17
17
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
18
18
|
import Layer from '../Layer';
|
|
19
19
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "76.
|
|
20
|
+
var packageVersion = "76.35.0";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -216,6 +216,7 @@ export function isInEmptyLine(state) {
|
|
|
216
216
|
}
|
|
217
217
|
export { dedupe } from './dedupe';
|
|
218
218
|
export { createWrapSelectionTransaction } from './create-wrap-selection-transaction';
|
|
219
|
+
export { transformNodeIntoListItem } from './insert-node-into-ordered-list';
|
|
219
220
|
export { wrapSelectionIn } from './wrap-selection-in';
|
|
220
221
|
export { toJSON, nodeToJSON } from './nodes';
|
|
221
222
|
export { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead } from './calculate-toolbar-position';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
import { findParentNodeOfType, findParentNodeOfTypeClosestToPos, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
+
import { isListNode } from './list';
|
|
6
|
+
export function transformNodeIntoListItem(tr, node) {
|
|
7
|
+
var _tr$doc$nodeAt, _findParentNodeOfType;
|
|
8
|
+
var _tr$selection = tr.selection,
|
|
9
|
+
$to = _tr$selection.$to,
|
|
10
|
+
$from = _tr$selection.$from,
|
|
11
|
+
to = _tr$selection.to,
|
|
12
|
+
from = _tr$selection.from;
|
|
13
|
+
var _tr$doc$type$schema$n = tr.doc.type.schema.nodes,
|
|
14
|
+
orderedList = _tr$doc$type$schema$n.orderedList,
|
|
15
|
+
bulletList = _tr$doc$type$schema$n.bulletList,
|
|
16
|
+
listItem = _tr$doc$type$schema$n.listItem;
|
|
17
|
+
var startLinePosition = $from.start();
|
|
18
|
+
var parentStartPosition = $from.depth === 0 ? 0 : $from.before();
|
|
19
|
+
|
|
20
|
+
// Setting the start position
|
|
21
|
+
var startMapped = startLinePosition === from ? parentStartPosition : from;
|
|
22
|
+
|
|
23
|
+
// Selected nodes
|
|
24
|
+
var selectionParentListItemNode = findParentNodeOfType(listItem)(tr.selection);
|
|
25
|
+
var selectionParentListNodeWithPos = findParentNodeOfType([bulletList, orderedList])(tr.selection);
|
|
26
|
+
var selectionParentListNode = selectionParentListNodeWithPos === null || selectionParentListNodeWithPos === void 0 ? void 0 : selectionParentListNodeWithPos.node;
|
|
27
|
+
if (!selectionParentListNodeWithPos) {
|
|
28
|
+
return tr;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Offsets
|
|
32
|
+
var listWrappingOffset = $to.depth - selectionParentListNodeWithPos.depth + 1; // difference in depth between to position and list node
|
|
33
|
+
var listItemWrappingOffset = $to.depth - selectionParentListNodeWithPos.depth; // difference in depth between to position and list item node
|
|
34
|
+
|
|
35
|
+
// Anything to do with nested lists should safeInsert and not be handled here
|
|
36
|
+
var grandParentListNode = findParentNodeOfTypeClosestToPos(tr.doc.resolve(selectionParentListNodeWithPos.pos), [bulletList, orderedList]);
|
|
37
|
+
var selectionIsInNestedList = !!grandParentListNode;
|
|
38
|
+
var selectedListItemHasNestedList = false;
|
|
39
|
+
selectionParentListItemNode === null || selectionParentListItemNode === void 0 || selectionParentListItemNode.node.content.forEach(function (child) {
|
|
40
|
+
if (isListNode(child)) {
|
|
41
|
+
selectedListItemHasNestedList = true;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
if (selectedListItemHasNestedList || selectionIsInNestedList) {
|
|
45
|
+
return safeInsert(node)(tr).scrollIntoView();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Check if node after the insert position is listItem
|
|
49
|
+
var isNodeAfterInsertPositionIsListItem = ((_tr$doc$nodeAt = tr.doc.nodeAt(to + listItemWrappingOffset)) === null || _tr$doc$nodeAt === void 0 ? void 0 : _tr$doc$nodeAt.type) === listItem;
|
|
50
|
+
var replaceTo;
|
|
51
|
+
if (isNodeAfterInsertPositionIsListItem) {
|
|
52
|
+
replaceTo = to + listItemWrappingOffset;
|
|
53
|
+
} else if (!isNodeAfterInsertPositionIsListItem) {
|
|
54
|
+
replaceTo = to;
|
|
55
|
+
} else {
|
|
56
|
+
replaceTo = to + listWrappingOffset;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// handle the insertion of the slice
|
|
60
|
+
tr.replaceWith(startMapped, replaceTo, node).scrollIntoView();
|
|
61
|
+
|
|
62
|
+
// Get the next list items position (used later to find the split out ordered list)
|
|
63
|
+
var indexOfNextListItem = $to.indexAfter($to.depth - listItemWrappingOffset);
|
|
64
|
+
var positionOfNextListItem = tr.doc.resolve(selectionParentListNodeWithPos.pos + 1).posAtIndex(indexOfNextListItem);
|
|
65
|
+
|
|
66
|
+
// Find the ordered list node after the pasted content so we can set it's order
|
|
67
|
+
var mappedPositionOfNextListItem = tr.mapping.map(positionOfNextListItem);
|
|
68
|
+
if (mappedPositionOfNextListItem > tr.doc.nodeSize) {
|
|
69
|
+
return tr;
|
|
70
|
+
}
|
|
71
|
+
var nodeAfterPastedContentResolvedPos = findParentNodeOfTypeClosestToPos(tr.doc.resolve(mappedPositionOfNextListItem), [orderedList]);
|
|
72
|
+
|
|
73
|
+
// Work out the new split out lists 'order' (the number it starts from)
|
|
74
|
+
var originalParentOrderedListNodeOrder = selectionParentListNode === null || selectionParentListNode === void 0 ? void 0 : selectionParentListNode.attrs.order;
|
|
75
|
+
var numOfListItemsInOriginalList = (_findParentNodeOfType = findParentNodeOfTypeClosestToPos(tr.doc.resolve(from - 1), [orderedList])) === null || _findParentNodeOfType === void 0 ? void 0 : _findParentNodeOfType.node.childCount;
|
|
76
|
+
|
|
77
|
+
// Set the new split out lists order attribute
|
|
78
|
+
if (typeof originalParentOrderedListNodeOrder === 'number' && numOfListItemsInOriginalList && nodeAfterPastedContentResolvedPos) {
|
|
79
|
+
tr.setNodeMarkup(nodeAfterPastedContentResolvedPos.pos, orderedList, _objectSpread(_objectSpread({}, nodeAfterPastedContentResolvedPos.node.attrs), {}, {
|
|
80
|
+
order: originalParentOrderedListNodeOrder + numOfListItemsInOriginalList
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
return tr;
|
|
84
|
+
}
|
|
@@ -376,4 +376,11 @@ export interface CollabAnalyticsProps {
|
|
|
376
376
|
export interface CollabEventLocalStepData {
|
|
377
377
|
steps: Array<Step>;
|
|
378
378
|
}
|
|
379
|
+
export interface Color {
|
|
380
|
+
solid: string;
|
|
381
|
+
selection: string;
|
|
382
|
+
}
|
|
383
|
+
export declare const colors: Color[];
|
|
384
|
+
export declare const TELEPOINTER_DIM_CLASS = "telepointer-dim";
|
|
385
|
+
export declare const telepointerStyle: import("@emotion/react").SerializedStyles;
|
|
379
386
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { SimplifiedNode } from '../analytics';
|
|
3
|
+
export type { SimplifiedNode };
|
|
4
|
+
export declare const getDocStructure: (doc: PMNode, options?: {
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
}) => SimplifiedNode | string;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { ExtensionProvider, ReferenceEntity } from '../../../extensions';
|
|
5
|
+
import type { ProsemirrorGetPosHandler } from '../../../react-node-view';
|
|
6
|
+
import type { EditorAppearance } from '../../../types';
|
|
7
|
+
import type { ExtensionsPluginInjectionAPI } from '../../types';
|
|
8
|
+
export interface Props {
|
|
9
|
+
node: PmNode;
|
|
10
|
+
getPos: ProsemirrorGetPosHandler;
|
|
11
|
+
view: EditorView;
|
|
12
|
+
extensionProvider?: ExtensionProvider;
|
|
13
|
+
handleContentDOMRef: (node: HTMLElement | null) => void;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
references?: ReferenceEntity[];
|
|
16
|
+
hideFrame?: boolean;
|
|
17
|
+
editorAppearance?: EditorAppearance;
|
|
18
|
+
pluginInjectionApi: ExtensionsPluginInjectionAPI;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* End workaround
|
|
22
|
+
*/
|
|
23
|
+
declare const _default: {
|
|
24
|
+
new (props: Props | Readonly<Props>): {
|
|
25
|
+
overflowContainer?: HTMLElement | null | undefined;
|
|
26
|
+
container?: HTMLElement | undefined;
|
|
27
|
+
shadowObserver?: import("../../../ui").ShadowObserver | undefined;
|
|
28
|
+
overflowContainerWidth: number;
|
|
29
|
+
scrollable?: NodeList | undefined;
|
|
30
|
+
diff?: number | undefined;
|
|
31
|
+
state: {
|
|
32
|
+
showLeftShadow: boolean;
|
|
33
|
+
showRightShadow: boolean;
|
|
34
|
+
};
|
|
35
|
+
componentWillUnmount(): void;
|
|
36
|
+
componentDidUpdate(): void;
|
|
37
|
+
handleScroll: (event: Event) => void;
|
|
38
|
+
updateShadows: () => void;
|
|
39
|
+
showLeftShadow: (overflowContainer: HTMLElement | null | undefined) => boolean;
|
|
40
|
+
calcOverflowDiff: () => number;
|
|
41
|
+
calcScrollableWidth: () => number;
|
|
42
|
+
handleContainer: (container: HTMLElement | null) => void;
|
|
43
|
+
initShadowObserver(): void;
|
|
44
|
+
render(): JSX.Element;
|
|
45
|
+
context: any;
|
|
46
|
+
setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
|
|
47
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
48
|
+
readonly props: Readonly<Props> & Readonly<{
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}>;
|
|
51
|
+
refs: {
|
|
52
|
+
[key: string]: React.ReactInstance;
|
|
53
|
+
};
|
|
54
|
+
componentDidMount?(): void;
|
|
55
|
+
shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
|
|
56
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
57
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
|
|
58
|
+
componentWillMount?(): void;
|
|
59
|
+
UNSAFE_componentWillMount?(): void;
|
|
60
|
+
componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
61
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
62
|
+
componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
|
|
63
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
|
|
64
|
+
};
|
|
65
|
+
new (props: Props, context: any): {
|
|
66
|
+
overflowContainer?: HTMLElement | null | undefined;
|
|
67
|
+
container?: HTMLElement | undefined;
|
|
68
|
+
shadowObserver?: import("../../../ui").ShadowObserver | undefined;
|
|
69
|
+
overflowContainerWidth: number;
|
|
70
|
+
scrollable?: NodeList | undefined;
|
|
71
|
+
diff?: number | undefined;
|
|
72
|
+
state: {
|
|
73
|
+
showLeftShadow: boolean;
|
|
74
|
+
showRightShadow: boolean;
|
|
75
|
+
};
|
|
76
|
+
componentWillUnmount(): void;
|
|
77
|
+
componentDidUpdate(): void;
|
|
78
|
+
handleScroll: (event: Event) => void;
|
|
79
|
+
updateShadows: () => void;
|
|
80
|
+
showLeftShadow: (overflowContainer: HTMLElement | null | undefined) => boolean;
|
|
81
|
+
calcOverflowDiff: () => number;
|
|
82
|
+
calcScrollableWidth: () => number;
|
|
83
|
+
handleContainer: (container: HTMLElement | null) => void;
|
|
84
|
+
initShadowObserver(): void;
|
|
85
|
+
render(): JSX.Element;
|
|
86
|
+
context: any;
|
|
87
|
+
setState<K extends keyof import("../../../ui").OverflowShadowState>(state: import("../../../ui").OverflowShadowState | ((prevState: Readonly<import("../../../ui").OverflowShadowState>, props: Readonly<Props>) => import("../../../ui").OverflowShadowState | Pick<import("../../../ui").OverflowShadowState, K> | null) | Pick<import("../../../ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
|
|
88
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
89
|
+
readonly props: Readonly<Props> & Readonly<{
|
|
90
|
+
children?: React.ReactNode;
|
|
91
|
+
}>;
|
|
92
|
+
refs: {
|
|
93
|
+
[key: string]: React.ReactInstance;
|
|
94
|
+
};
|
|
95
|
+
componentDidMount?(): void;
|
|
96
|
+
shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): boolean;
|
|
97
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
98
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<import("../../../ui").OverflowShadowState>): any;
|
|
99
|
+
componentWillMount?(): void;
|
|
100
|
+
UNSAFE_componentWillMount?(): void;
|
|
101
|
+
componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
102
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
103
|
+
componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
|
|
104
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("../../../ui").OverflowShadowState>, nextContext: any): void;
|
|
105
|
+
};
|
|
106
|
+
contextType?: React.Context<any> | undefined;
|
|
107
|
+
};
|
|
108
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const widerLayoutClassName = "wider-layout";
|
|
2
|
+
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const header: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const content: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const contentWrapper: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Component } from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
+
export interface Props {
|
|
7
|
+
node: PmNode;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export default class InlineExtension extends Component<Props, any> {
|
|
11
|
+
render(): jsx.JSX.Element;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
+
export declare const capitalizeFirstLetter: (str: string) => string;
|
|
6
|
+
export interface Props {
|
|
7
|
+
node: PmNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const ICON_SIZE = 24;
|
|
10
|
+
export default class ExtensionLozenge extends Component<Props, any> {
|
|
11
|
+
render(): jsx.JSX.Element;
|
|
12
|
+
private renderImage;
|
|
13
|
+
private renderFallback;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BODIED_EXT_PADDING, EXTENSION_PADDING } from '../../styles';
|
|
2
|
+
export { EXTENSION_PADDING as padding, BODIED_EXT_PADDING };
|
|
3
|
+
export declare const wrapperDefault: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const overlay: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const placeholderFallback: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const placeholderFallbackParams: import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const styledImage: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { EventDispatcher } from '../event-dispatcher';
|
|
5
|
+
import type { ExtensionHandlers, ReferenceEntity } from '../extensions';
|
|
6
|
+
import { ProviderFactory } from '../provider-factory';
|
|
7
|
+
import type { ProsemirrorGetPosHandler } from '../react-node-view';
|
|
8
|
+
import type { EditorAppearance } from '../types';
|
|
9
|
+
import type { ExtensionsPluginInjectionAPI } from './types';
|
|
10
|
+
export interface Props {
|
|
11
|
+
editorView: EditorView;
|
|
12
|
+
node: PMNode;
|
|
13
|
+
getPos: ProsemirrorGetPosHandler;
|
|
14
|
+
providerFactory?: ProviderFactory;
|
|
15
|
+
handleContentDOMRef: (node: HTMLElement | null) => void;
|
|
16
|
+
extensionHandlers: ExtensionHandlers;
|
|
17
|
+
references?: ReferenceEntity[];
|
|
18
|
+
editorAppearance?: EditorAppearance;
|
|
19
|
+
pluginInjectionApi: ExtensionsPluginInjectionAPI;
|
|
20
|
+
eventDispatcher?: EventDispatcher;
|
|
21
|
+
}
|
|
22
|
+
export declare class Extension extends Component<Props, any> {
|
|
23
|
+
static displayName: string;
|
|
24
|
+
private providerFactory;
|
|
25
|
+
constructor(props: Props);
|
|
26
|
+
componentWillUnmount(): void;
|
|
27
|
+
private renderWithProvider;
|
|
28
|
+
render(): JSX.Element;
|
|
29
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { EventDispatcher } from '../event-dispatcher';
|
|
5
|
+
import { getExtensionModuleNodePrivateProps, getNodeRenderer } from '../extensions';
|
|
6
|
+
import type { ExtensionHandlers, ExtensionProvider, ReferenceEntity } from '../extensions';
|
|
7
|
+
import type { ProsemirrorGetPosHandler } from '../react-node-view';
|
|
8
|
+
import type { EditorAppearance } from '../types';
|
|
9
|
+
import type { ExtensionsPluginInjectionAPI } from './types';
|
|
10
|
+
export interface Props {
|
|
11
|
+
editorView: EditorView;
|
|
12
|
+
node: PMNode;
|
|
13
|
+
getPos: ProsemirrorGetPosHandler;
|
|
14
|
+
handleContentDOMRef: (node: HTMLElement | null) => void;
|
|
15
|
+
extensionHandlers: ExtensionHandlers;
|
|
16
|
+
extensionProvider?: Promise<ExtensionProvider>;
|
|
17
|
+
references?: ReferenceEntity[];
|
|
18
|
+
editorAppearance?: EditorAppearance;
|
|
19
|
+
pluginInjectionApi: ExtensionsPluginInjectionAPI;
|
|
20
|
+
eventDispatcher?: EventDispatcher;
|
|
21
|
+
}
|
|
22
|
+
export interface State {
|
|
23
|
+
extensionProvider?: ExtensionProvider;
|
|
24
|
+
extensionHandlersFromProvider?: ExtensionHandlers;
|
|
25
|
+
_privateProps?: {
|
|
26
|
+
__hideFrame?: boolean;
|
|
27
|
+
};
|
|
28
|
+
activeChildIndex?: number;
|
|
29
|
+
}
|
|
30
|
+
export declare class ExtensionComponent extends Component<Props, State> {
|
|
31
|
+
private privatePropsParsed;
|
|
32
|
+
state: State;
|
|
33
|
+
mounted: boolean;
|
|
34
|
+
UNSAFE_componentWillMount(): void;
|
|
35
|
+
componentDidMount(): void;
|
|
36
|
+
componentDidUpdate(): void;
|
|
37
|
+
componentWillUnmount(): void;
|
|
38
|
+
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
39
|
+
getNodeRenderer: import("memoize-one").MemoizedFn<typeof getNodeRenderer>;
|
|
40
|
+
getExtensionModuleNodePrivateProps: import("memoize-one").MemoizedFn<typeof getExtensionModuleNodePrivateProps>;
|
|
41
|
+
render(): JSX.Element | null;
|
|
42
|
+
private setStateFromPromise;
|
|
43
|
+
/**
|
|
44
|
+
* Parses any private nodes once an extension provider is available.
|
|
45
|
+
*
|
|
46
|
+
* We do this separately from resolving a node renderer component since the
|
|
47
|
+
* private props come from extension provider, rather than an extension
|
|
48
|
+
* handler which only handles `render`/component concerns.
|
|
49
|
+
*/
|
|
50
|
+
private parsePrivateNodePropsIfNeeded;
|
|
51
|
+
private tryExtensionHandler;
|
|
52
|
+
private handleExtension;
|
|
53
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
nodeType: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* If inlineExtension, add zero width space to the end of the nodes and wrap with span;
|
|
8
|
+
* else wrap with a div (for multi bodied extensions)
|
|
9
|
+
*
|
|
10
|
+
* @param param0
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare const ExtensionNodeWrapper: ({ children, nodeType }: Props) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
+
import type { EventDispatcher } from '../../event-dispatcher';
|
|
7
|
+
import type { MultiBodiedExtensionActions } from '../../extensions';
|
|
8
|
+
import type { EditorAppearance } from '../../types';
|
|
9
|
+
import type { OverflowShadowProps } from '../../ui';
|
|
10
|
+
import type { ExtensionsPluginInjectionAPI } from '../types';
|
|
11
|
+
export type TryExtensionHandlerType = (actions: MultiBodiedExtensionActions | undefined) => React.ReactElement | null;
|
|
12
|
+
type Props = {
|
|
13
|
+
node: PmNode;
|
|
14
|
+
handleContentDOMRef: (node: HTMLElement | null) => void;
|
|
15
|
+
editorView: EditorView;
|
|
16
|
+
getPos: () => number | undefined;
|
|
17
|
+
tryExtensionHandler: TryExtensionHandlerType;
|
|
18
|
+
eventDispatcher?: EventDispatcher;
|
|
19
|
+
pluginInjectionApi?: ExtensionsPluginInjectionAPI;
|
|
20
|
+
editorAppearance?: EditorAppearance;
|
|
21
|
+
};
|
|
22
|
+
declare const MultiBodiedExtension: (props: Props & OverflowShadowProps) => jsx.JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* End workaround
|
|
25
|
+
*/
|
|
26
|
+
export default MultiBodiedExtension;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { EventDispatcher } from '../event-dispatcher';
|
|
5
|
+
import type { ExtensionHandlers } from '../extensions';
|
|
6
|
+
import type { ProviderFactory } from '../provider-factory';
|
|
7
|
+
import type { ForwardRef, getPosHandler } from '../react-node-view';
|
|
8
|
+
import ReactNodeView from '../react-node-view';
|
|
9
|
+
import type { EditorAppearance } from '../types';
|
|
10
|
+
import type { PortalProviderAPI } from '../ui/PortalProvider';
|
|
11
|
+
import type { ExtensionsPluginInjectionAPI } from './types';
|
|
12
|
+
interface ExtensionNodeViewOptions {
|
|
13
|
+
appearance?: EditorAppearance;
|
|
14
|
+
}
|
|
15
|
+
export declare class ExtensionNode extends ReactNodeView {
|
|
16
|
+
ignoreMutation(mutation: MutationRecord | {
|
|
17
|
+
type: 'selection';
|
|
18
|
+
target: Element;
|
|
19
|
+
}): boolean;
|
|
20
|
+
getContentDOM(): {
|
|
21
|
+
dom: HTMLDivElement;
|
|
22
|
+
} | undefined;
|
|
23
|
+
render(props: {
|
|
24
|
+
providerFactory: ProviderFactory;
|
|
25
|
+
extensionHandlers: ExtensionHandlers;
|
|
26
|
+
extensionNodeViewOptions?: ExtensionNodeViewOptions;
|
|
27
|
+
pluginInjectionApi: ExtensionsPluginInjectionAPI;
|
|
28
|
+
}, forwardRef: ForwardRef): JSX.Element;
|
|
29
|
+
}
|
|
30
|
+
export default function ExtensionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: ExtensionsPluginInjectionAPI): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EditorContainerWidth, NextEditorPlugin, PublicPluginAPI } from '../types';
|
|
2
|
+
type WidthPluginType = NextEditorPlugin<'width', {
|
|
3
|
+
sharedState: EditorContainerWidth | undefined;
|
|
4
|
+
}>;
|
|
5
|
+
export type ExtensionsPluginInjectionAPI = PublicPluginAPI<[WidthPluginType]> | undefined;
|
|
6
|
+
export {};
|
|
@@ -9,6 +9,8 @@ export interface ExtensionParams<T extends Parameters> {
|
|
|
9
9
|
content?: object | string;
|
|
10
10
|
localId?: string;
|
|
11
11
|
fragmentLocalId?: string;
|
|
12
|
+
maxFrames?: number;
|
|
13
|
+
layout?: string;
|
|
12
14
|
}
|
|
13
15
|
export type ExtensionHandler<T extends Parameters = Parameters> = (ext: ExtensionParams<T>, doc: object, actions?: MultiBodiedExtensionActions) => JSX.Element | null;
|
|
14
16
|
export type OnSaveCallback<T extends Parameters = Parameters> = (params: T) => void;
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
import type { FC } from 'react';
|
|
3
3
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
4
|
import type { FileIdentifier, MediaClient } from '@atlaskit/media-client';
|
|
5
|
-
import type { MediaInlineAttrs } from './types';
|
|
5
|
+
import type { MediaInlineAttrs, MediaSSR } from './types';
|
|
6
6
|
export interface MediaInlineImageCardProps {
|
|
7
7
|
identifier: FileIdentifier;
|
|
8
|
-
mediaClient
|
|
8
|
+
mediaClient?: MediaClient;
|
|
9
9
|
isSelected?: boolean;
|
|
10
10
|
isLazy?: boolean;
|
|
11
11
|
border?: {
|
|
12
12
|
borderSize?: number;
|
|
13
13
|
borderColor?: string;
|
|
14
14
|
};
|
|
15
|
+
ssr?: MediaSSR;
|
|
15
16
|
}
|
|
16
17
|
export declare const MediaInlineImageCardInternal: FC<MediaInlineImageCardProps & WrappedComponentProps & MediaInlineAttrs>;
|
|
17
18
|
export declare const MediaInlineImageCard: FC<MediaInlineImageCardProps & MediaInlineAttrs>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type { SSR } from '@atlaskit/media-common';
|
|
2
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
1
3
|
export type MediaInlineAttrs = {
|
|
2
4
|
type?: string;
|
|
3
5
|
alt?: string;
|
|
4
6
|
width?: number;
|
|
5
7
|
height?: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
};
|
|
9
|
+
export type MediaSSR = {
|
|
10
|
+
mode: SSR;
|
|
11
|
+
config: MediaClientConfig;
|
|
8
12
|
};
|
|
@@ -28,7 +28,7 @@ export type { EditorReactContext } from './editor-react-context';
|
|
|
28
28
|
export type { PMPluginFactoryParams, PMPluginFactory, PMPlugin, } from './plugin-factory';
|
|
29
29
|
export type { NodeConfig, MarkConfig, NodeViewConfig, } from './prosemirror-config';
|
|
30
30
|
export type { PluginsOptions, EditorPlugin, getPosHandler, getPosHandlerNode, } from './editor-plugin';
|
|
31
|
-
export type { NextEditorPlugin, AllEditorPresetPluginTypes, PluginDependenciesAPI, ExtractPluginNameFromAllBuilderPlugins, SafePresetCheck, DefaultEditorPlugin, OptionalPlugin, PluginInjectionAPI, CreatePluginDependenciesAPI, NextEditorPluginMetadata, ExtractInjectionAPI, ExtractPluginActions,
|
|
31
|
+
export type { NextEditorPlugin, AllEditorPresetPluginTypes, PluginDependenciesAPI, ExtractPluginNameFromAllBuilderPlugins, SafePresetCheck, DefaultEditorPlugin, OptionalPlugin, PluginInjectionAPI, CreatePluginDependenciesAPI, NextEditorPluginMetadata, ExtractInjectionAPI, ExtractPluginActions, PluginInjectionAPIWithDependencies, PublicPluginAPI, NextEditorPluginFunctionOptionalConfigDefinition, ExtractNextEditorPlugins, } from './next-editor-plugin';
|
|
32
32
|
export type { ExtractPublicEditorAPI } from './editor-public-api';
|
|
33
33
|
export type { EditorCommand, EditorCommandWithMetadata, } from './editor-command';
|
|
34
34
|
export type IconProps = {
|
|
@@ -46,7 +46,6 @@ export type PluginInjectionAPI<Name extends string, Metadata extends NextEditorP
|
|
|
46
46
|
...ExtractPluginDependenciesFromMetadata<Metadata>
|
|
47
47
|
]>;
|
|
48
48
|
};
|
|
49
|
-
export type PluginInjectionAPIWithDependency<Plugin extends NextEditorPlugin<any, any>> = PublicPluginAPI<[Plugin]>;
|
|
50
49
|
export type PluginInjectionAPIWithDependencies<Plugins extends NextEditorPlugin<any, any>[]> = PublicPluginAPI<Plugins>;
|
|
51
50
|
export type NextEditorPluginFunctionOptionalConfigDefinition<Name extends string, Metadata extends NextEditorPluginMetadata, Configuration = undefined> = (props: {
|
|
52
51
|
config: Configuration;
|