@atlaskit/editor-common 75.5.2 → 75.6.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 +6 -0
- package/dist/cjs/analytics/fire-analytics-event.js +2 -1
- package/dist/cjs/analytics/index.js +6 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +204 -0
- package/dist/cjs/ui-menu/DropdownContainer/index.js +33 -0
- package/dist/cjs/ui-menu/index.js +14 -0
- package/dist/cjs/utils/index.js +12 -0
- package/dist/cjs/utils/nodes.js +13 -2
- package/dist/es2019/analytics/fire-analytics-event.js +1 -1
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +212 -0
- package/dist/es2019/ui-menu/DropdownContainer/index.js +21 -0
- package/dist/es2019/ui-menu/index.js +3 -1
- package/dist/es2019/utils/index.js +2 -1
- package/dist/es2019/utils/nodes.js +9 -1
- package/dist/esm/analytics/fire-analytics-event.js +1 -1
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-menu/ColorPickerButton/index.js +197 -0
- package/dist/esm/ui-menu/DropdownContainer/index.js +23 -0
- package/dist/esm/ui-menu/index.js +3 -1
- package/dist/esm/utils/index.js +2 -1
- package/dist/esm/utils/nodes.js +9 -1
- package/dist/types/analytics/fire-analytics-event.d.ts +2 -0
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/ui/DropList/index.d.ts +1 -1
- package/dist/types/ui/index.d.ts +1 -0
- package/dist/types/ui-menu/ColorPickerButton/index.d.ts +28 -0
- package/dist/types/ui-menu/DropdownContainer/index.d.ts +3 -0
- package/dist/types/ui-menu/index.d.ts +2 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/nodes.d.ts +3 -0
- package/dist/types-ts4.5/analytics/fire-analytics-event.d.ts +2 -0
- package/dist/types-ts4.5/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/index.d.ts +1 -0
- package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +28 -0
- package/dist/types-ts4.5/ui-menu/DropdownContainer/index.d.ts +3 -0
- package/dist/types-ts4.5/ui-menu/index.d.ts +2 -0
- package/dist/types-ts4.5/utils/index.d.ts +1 -0
- package/dist/types-ts4.5/utils/nodes.d.ts +3 -0
- package/package.json +4 -4
|
@@ -4,4 +4,6 @@ export { ArrowKeyNavigationProvider } from './ArrowKeyNavigationProvider';
|
|
|
4
4
|
export { ToolbarArrowKeyNavigationProvider, KeyDownHandlerContext } from './ToolbarArrowKeyNavigationProvider';
|
|
5
5
|
export { ArrowKeyNavigationType } from './ArrowKeyNavigationProvider/types';
|
|
6
6
|
export { ColorPaletteArrowKeyNavigationProvider } from './ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider';
|
|
7
|
-
export { default as Dropdown } from './Dropdown';
|
|
7
|
+
export { default as Dropdown } from './Dropdown';
|
|
8
|
+
export { default as ColorPickerButton } from './ColorPickerButton';
|
|
9
|
+
export { DropdownContainer } from './DropdownContainer';
|
|
@@ -213,4 +213,5 @@ export function isInEmptyLine(state) {
|
|
|
213
213
|
}
|
|
214
214
|
export { dedupe } from './dedupe';
|
|
215
215
|
export { createWrapSelectionTransaction } from './create-wrap-selection-transaction';
|
|
216
|
-
export { wrapSelectionIn } from './wrap-selection-in';
|
|
216
|
+
export { wrapSelectionIn } from './wrap-selection-in';
|
|
217
|
+
export { toJSON, nodeToJSON } from './nodes';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
1
2
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
2
3
|
/**
|
|
3
4
|
* Finds all top level nodes affected by the transaction
|
|
@@ -114,4 +115,11 @@ export const isNodeBeforeMediaNode = ($pos, state) => {
|
|
|
114
115
|
return ['media', 'mediaInline', 'mediaGroup', 'mediaSingle'].includes(nodeBefore.type.name);
|
|
115
116
|
}
|
|
116
117
|
return false;
|
|
117
|
-
};
|
|
118
|
+
};
|
|
119
|
+
const transformer = new JSONTransformer();
|
|
120
|
+
export function toJSON(node) {
|
|
121
|
+
return transformer.encode(node);
|
|
122
|
+
}
|
|
123
|
+
export function nodeToJSON(node) {
|
|
124
|
+
return transformer.encodeNode(node);
|
|
125
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FabricChannel } from '@atlaskit/analytics-listeners';
|
|
2
2
|
import { AnalyticsQueue } from './analytics-queue';
|
|
3
|
-
var editorAnalyticsChannel = FabricChannel.editor;
|
|
3
|
+
export var editorAnalyticsChannel = FabricChannel.editor;
|
|
4
4
|
export var fireAnalyticsEvent = function fireAnalyticsEvent(createAnalyticsEvent) {
|
|
5
5
|
return function (_ref) {
|
|
6
6
|
var payload = _ref.payload,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, BROWSER_FREEZE_INTERACTION_TYPE, CONTENT_COMPONENT, DELETE_DIRECTION, EVENT_TYPE, FLOATING_CONTROLS_TITLE, FULL_WIDTH_MODE, GAP_CURSOR_POSITION, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LAYOUT_TYPE, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS, MODE, PLATFORMS, PUNC, PasteContents, PasteSources, PasteTypes, RESOLVE_METHOD, SELECTION_TYPE, SELECTION_POSITION, SMART_LINK_TYPE, SYMBOL, SmartLinkNodeContexts, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TARGET_SELECTION_SOURCE, TOOLBAR_ACTION_SUBJECT_ID, TRIGGER_METHOD, USER_CONTEXT } from './types';
|
|
2
|
-
export { fireAnalyticsEvent } from './fire-analytics-event';
|
|
2
|
+
export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-event';
|
|
3
3
|
export { getAnalyticsEventsFromTransaction } from './utils';
|
|
4
4
|
export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
|
|
@@ -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 = "75.
|
|
9
|
+
var packageVersion = "75.6.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
|
|
@@ -19,7 +19,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
19
19
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
20
20
|
import Layer from '../Layer';
|
|
21
21
|
var packageName = "@atlaskit/editor-common";
|
|
22
|
-
var packageVersion = "75.
|
|
22
|
+
var packageVersion = "75.6.0";
|
|
23
23
|
var halfFocusRing = 1;
|
|
24
24
|
var dropOffset = '0, 8';
|
|
25
25
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
|
+
import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
|
+
import Button from '@atlaskit/button';
|
|
9
|
+
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
10
|
+
import { DN50, N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
11
|
+
import { themed } from '@atlaskit/theme/components';
|
|
12
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
13
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
14
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
15
|
+
import { ColorPalette, DEFAULT_BORDER_COLOR, getSelectedRowAndColumnFromPalette } from '../../ui-color';
|
|
16
|
+
import { default as Popup } from '../../ui/Popup';
|
|
17
|
+
import { default as withOuterListeners } from '../../ui/with-outer-listeners';
|
|
18
|
+
import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
19
|
+
import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
|
|
20
|
+
|
|
21
|
+
// helps adjusts position of popup
|
|
22
|
+
var colorPickerButtonWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
23
|
+
var colorPickerExpandContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 0px ", ";\n"])), "var(--ds-space-negative-050, -4px)");
|
|
24
|
+
|
|
25
|
+
// Control the size of color picker buttons and preview
|
|
26
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4134
|
|
27
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
28
|
+
var colorPickerWrapper = function colorPickerWrapper(theme) {
|
|
29
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n background-color: ", ";\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n padding: ", " 0px;\n"])), borderRadius(), themed({
|
|
30
|
+
light: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
31
|
+
dark: "var(--ds-surface-overlay, ".concat(DN50, ")")
|
|
32
|
+
})(theme), N60A, N60A, "var(--ds-space-100, 8px)");
|
|
33
|
+
};
|
|
34
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
35
|
+
|
|
36
|
+
var ColorPaletteWithListeners = withOuterListeners(ColorPalette);
|
|
37
|
+
var ColorPickerButton = function ColorPickerButton(props) {
|
|
38
|
+
var buttonRef = React.useRef(null);
|
|
39
|
+
var _React$useState = React.useState(false),
|
|
40
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
41
|
+
isPopupOpen = _React$useState2[0],
|
|
42
|
+
setIsPopupOpen = _React$useState2[1];
|
|
43
|
+
var _React$useState3 = React.useState(false),
|
|
44
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
45
|
+
isPopupPositioned = _React$useState4[0],
|
|
46
|
+
setIsPopupPositioned = _React$useState4[1];
|
|
47
|
+
var _React$useState5 = React.useState(false),
|
|
48
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
49
|
+
isOpenedByKeyboard = _React$useState6[0],
|
|
50
|
+
setIsOpenedByKeyboard = _React$useState6[1];
|
|
51
|
+
var togglePopup = function togglePopup() {
|
|
52
|
+
setIsPopupOpen(!isPopupOpen);
|
|
53
|
+
if (!isPopupOpen) {
|
|
54
|
+
setIsOpenedByKeyboard(false);
|
|
55
|
+
setIsPopupPositioned(false);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
React.useEffect(function () {
|
|
59
|
+
if (props.setDisableParentScroll) {
|
|
60
|
+
props.setDisableParentScroll(isPopupOpen);
|
|
61
|
+
}
|
|
62
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
63
|
+
}, [isPopupOpen]);
|
|
64
|
+
var focusButton = function focusButton() {
|
|
65
|
+
var _buttonRef$current;
|
|
66
|
+
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.focus();
|
|
67
|
+
};
|
|
68
|
+
var handleEsc = React.useCallback(function () {
|
|
69
|
+
setIsOpenedByKeyboard(false);
|
|
70
|
+
setIsPopupPositioned(false);
|
|
71
|
+
setIsPopupOpen(false);
|
|
72
|
+
focusButton();
|
|
73
|
+
}, []);
|
|
74
|
+
var onPositionCalculated = React.useCallback(function (position) {
|
|
75
|
+
setIsPopupPositioned(true);
|
|
76
|
+
return position;
|
|
77
|
+
}, []);
|
|
78
|
+
var onChange = props.onChange,
|
|
79
|
+
createAnalyticsEvent = props.createAnalyticsEvent,
|
|
80
|
+
colorPalette = props.colorPalette,
|
|
81
|
+
placement = props.placement,
|
|
82
|
+
skipFocusButtonAfterPick = props.skipFocusButtonAfterPick;
|
|
83
|
+
var onColorSelected = React.useCallback(function (color, label) {
|
|
84
|
+
setIsOpenedByKeyboard(false);
|
|
85
|
+
setIsPopupOpen(false);
|
|
86
|
+
setIsPopupPositioned(false);
|
|
87
|
+
if (onChange) {
|
|
88
|
+
if (createAnalyticsEvent) {
|
|
89
|
+
// fire analytics
|
|
90
|
+
var payload = {
|
|
91
|
+
action: ACTION.UPDATED,
|
|
92
|
+
actionSubject: ACTION_SUBJECT.PICKER,
|
|
93
|
+
actionSubjectId: ACTION_SUBJECT_ID.PICKER_COLOR,
|
|
94
|
+
attributes: {
|
|
95
|
+
color: color,
|
|
96
|
+
label: label,
|
|
97
|
+
placement: placement
|
|
98
|
+
},
|
|
99
|
+
eventType: EVENT_TYPE.TRACK
|
|
100
|
+
};
|
|
101
|
+
createAnalyticsEvent(payload).fire(editorAnalyticsChannel);
|
|
102
|
+
}
|
|
103
|
+
var newPalette = colorPalette.find(function (colorPalette) {
|
|
104
|
+
return colorPalette.value === color;
|
|
105
|
+
});
|
|
106
|
+
newPalette && onChange(newPalette);
|
|
107
|
+
}
|
|
108
|
+
if (!skipFocusButtonAfterPick) {
|
|
109
|
+
focusButton();
|
|
110
|
+
}
|
|
111
|
+
}, [colorPalette, onChange, createAnalyticsEvent, placement, skipFocusButtonAfterPick]);
|
|
112
|
+
var renderPopup = function renderPopup() {
|
|
113
|
+
if (!isPopupOpen || !buttonRef.current) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
var selectedColor = props.currentColor || null;
|
|
117
|
+
var _getSelectedRowAndCol = getSelectedRowAndColumnFromPalette(props.colorPalette, selectedColor, props.cols),
|
|
118
|
+
selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
|
|
119
|
+
selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
|
|
120
|
+
return jsx(Popup, {
|
|
121
|
+
target: buttonRef.current,
|
|
122
|
+
fitHeight: 350,
|
|
123
|
+
fitWidth: 350,
|
|
124
|
+
offset: [0, 10],
|
|
125
|
+
alignX: props.alignX,
|
|
126
|
+
mountTo: props.setDisableParentScroll ? props.mountPoint : undefined
|
|
127
|
+
// Confluence inline comment editor has z-index: 500
|
|
128
|
+
// if the toolbar is scrollable, this will be mounted in the root editor
|
|
129
|
+
// we need an index of > 500 to display over it
|
|
130
|
+
,
|
|
131
|
+
zIndex: props.setDisableParentScroll ? 600 : undefined,
|
|
132
|
+
ariaLabel: "Color picker popup",
|
|
133
|
+
onPositionCalculated: onPositionCalculated
|
|
134
|
+
}, jsx("div", {
|
|
135
|
+
css: colorPickerWrapper,
|
|
136
|
+
"data-test-id": "color-picker-menu"
|
|
137
|
+
}, jsx(ArrowKeyNavigationProvider, {
|
|
138
|
+
type: ArrowKeyNavigationType.COLOR,
|
|
139
|
+
selectedRowIndex: selectedRowIndex,
|
|
140
|
+
selectedColumnIndex: selectedColumnIndex,
|
|
141
|
+
closeOnTab: true,
|
|
142
|
+
handleClose: function handleClose() {
|
|
143
|
+
return setIsPopupOpen(false);
|
|
144
|
+
},
|
|
145
|
+
isOpenedByKeyboard: isOpenedByKeyboard,
|
|
146
|
+
isPopupPositioned: isPopupPositioned
|
|
147
|
+
}, jsx(ColorPaletteWithListeners, {
|
|
148
|
+
cols: props.cols,
|
|
149
|
+
selectedColor: selectedColor,
|
|
150
|
+
onClick: onColorSelected,
|
|
151
|
+
handleClickOutside: togglePopup,
|
|
152
|
+
handleEscapeKeydown: handleEsc,
|
|
153
|
+
paletteOptions: {
|
|
154
|
+
palette: props.colorPalette,
|
|
155
|
+
hexToPaletteColor: props.hexToPaletteColor,
|
|
156
|
+
paletteColorTooltipMessages: props.paletteColorTooltipMessages
|
|
157
|
+
}
|
|
158
|
+
}))));
|
|
159
|
+
};
|
|
160
|
+
var title = props.title || '';
|
|
161
|
+
var currentColor = props.currentColor && props.hexToPaletteColor ? props.hexToPaletteColor(props.currentColor) : props.currentColor;
|
|
162
|
+
var buttonStyle = function buttonStyle(theme) {
|
|
163
|
+
var _props$size, _props$size2, _props$size3;
|
|
164
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 10px;\n background-color: ", ";\n ", "\n &:before {\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: center;\n content: '';\n border: 1px solid ", ";\n border-radius: ", "px;\n background-color: ", ";\n width: ", ";\n height: ", ";\n padding: 0;\n margin: 0px ", ";\n }\n &:hover {\n background: ", ";\n }\n "])), "var(--ds-background-neutral-subtle, transparent)", /* If custom props size height, override the button base height property */
|
|
165
|
+
!!((_props$size = props.size) !== null && _props$size !== void 0 && _props$size.height) && "height: inherit;", DEFAULT_BORDER_COLOR, borderRadius(), currentColor || 'transparent', ((_props$size2 = props.size) === null || _props$size2 === void 0 ? void 0 : _props$size2.width) || '14px', ((_props$size3 = props.size) === null || _props$size3 === void 0 ? void 0 : _props$size3.height) || '14px', "var(--ds-space-025, 2px)", themed({
|
|
166
|
+
light: "var(--ds-background-neutral-subtle-hovered, ".concat(N30A, ")"),
|
|
167
|
+
dark: "var(--ds-background-neutral-subtle-hovered, ".concat(N30A, ")")
|
|
168
|
+
})(theme));
|
|
169
|
+
};
|
|
170
|
+
return jsx("div", {
|
|
171
|
+
css: colorPickerButtonWrapper
|
|
172
|
+
}, jsx(Tooltip, {
|
|
173
|
+
content: title,
|
|
174
|
+
position: "top"
|
|
175
|
+
}, jsx(Button, {
|
|
176
|
+
ref: buttonRef,
|
|
177
|
+
"aria-label": title,
|
|
178
|
+
spacing: "compact",
|
|
179
|
+
onClick: togglePopup,
|
|
180
|
+
onKeyDown: function onKeyDown(event) {
|
|
181
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
182
|
+
event.preventDefault();
|
|
183
|
+
togglePopup();
|
|
184
|
+
setIsOpenedByKeyboard(true);
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
css: buttonStyle,
|
|
188
|
+
iconAfter: jsx("span", {
|
|
189
|
+
css: colorPickerExpandContainer
|
|
190
|
+
}, jsx(ExpandIcon, {
|
|
191
|
+
label: ""
|
|
192
|
+
}))
|
|
193
|
+
})), renderPopup());
|
|
194
|
+
};
|
|
195
|
+
export default withAnalyticsContext({
|
|
196
|
+
source: 'ConfigPanel'
|
|
197
|
+
})(withAnalyticsEvents()(ColorPickerButton));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
/** @jsx jsx */
|
|
7
|
+
import React, { useContext } from 'react';
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
9
|
+
import DropdownComponent from '../Dropdown';
|
|
10
|
+
import { KeyDownHandlerContext } from '../ToolbarArrowKeyNavigationProvider';
|
|
11
|
+
export var DropdownContainer = /*#__PURE__*/React.memo(function (_ref) {
|
|
12
|
+
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
13
|
+
var keyDownHandlerContext = useContext(KeyDownHandlerContext);
|
|
14
|
+
return (
|
|
15
|
+
//This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
16
|
+
//Default context has the void callbacks for above key events
|
|
17
|
+
jsx(DropdownComponent, _extends({
|
|
18
|
+
arrowKeyNavigationProviderOptions: _objectSpread(_objectSpread({}, props.arrowKeyNavigationProviderOptions), {}, {
|
|
19
|
+
keyDownHandlerContext: keyDownHandlerContext
|
|
20
|
+
})
|
|
21
|
+
}, props))
|
|
22
|
+
);
|
|
23
|
+
});
|
|
@@ -4,4 +4,6 @@ export { ArrowKeyNavigationProvider } from './ArrowKeyNavigationProvider';
|
|
|
4
4
|
export { ToolbarArrowKeyNavigationProvider, KeyDownHandlerContext } from './ToolbarArrowKeyNavigationProvider';
|
|
5
5
|
export { ArrowKeyNavigationType } from './ArrowKeyNavigationProvider/types';
|
|
6
6
|
export { ColorPaletteArrowKeyNavigationProvider } from './ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider';
|
|
7
|
-
export { default as Dropdown } from './Dropdown';
|
|
7
|
+
export { default as Dropdown } from './Dropdown';
|
|
8
|
+
export { default as ColorPickerButton } from './ColorPickerButton';
|
|
9
|
+
export { DropdownContainer } from './DropdownContainer';
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -216,4 +216,5 @@ export function isInEmptyLine(state) {
|
|
|
216
216
|
}
|
|
217
217
|
export { dedupe } from './dedupe';
|
|
218
218
|
export { createWrapSelectionTransaction } from './create-wrap-selection-transaction';
|
|
219
|
-
export { wrapSelectionIn } from './wrap-selection-in';
|
|
219
|
+
export { wrapSelectionIn } from './wrap-selection-in';
|
|
220
|
+
export { toJSON, nodeToJSON } from './nodes';
|
package/dist/esm/utils/nodes.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
1
2
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
2
3
|
/**
|
|
3
4
|
* Finds all top level nodes affected by the transaction
|
|
@@ -127,4 +128,11 @@ export var isNodeBeforeMediaNode = function isNodeBeforeMediaNode($pos, state) {
|
|
|
127
128
|
return ['media', 'mediaInline', 'mediaGroup', 'mediaSingle'].includes(nodeBefore.type.name);
|
|
128
129
|
}
|
|
129
130
|
return false;
|
|
130
|
-
};
|
|
131
|
+
};
|
|
132
|
+
var transformer = new JSONTransformer();
|
|
133
|
+
export function toJSON(node) {
|
|
134
|
+
return transformer.encode(node);
|
|
135
|
+
}
|
|
136
|
+
export function nodeToJSON(node) {
|
|
137
|
+
return transformer.encodeNode(node);
|
|
138
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, BROWSER_FREEZE_INTERACTION_TYPE, CONTENT_COMPONENT, DELETE_DIRECTION, EVENT_TYPE, FLOATING_CONTROLS_TITLE, FULL_WIDTH_MODE, GAP_CURSOR_POSITION, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LAYOUT_TYPE, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS, MODE, PLATFORMS, PUNC, PasteContents, PasteSources, PasteTypes, RESOLVE_METHOD, SELECTION_TYPE, SELECTION_POSITION, SMART_LINK_TYPE, SYMBOL, SmartLinkNodeContexts, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TARGET_SELECTION_SOURCE, TOOLBAR_ACTION_SUBJECT_ID, TRIGGER_METHOD, USER_CONTEXT, } from './types';
|
|
2
2
|
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, AnnotationAEP, AnnotationAEPAttributes, AnnotationActionType, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, CaptionTrackAction, ColorPickerAEP, CommonListAnalyticsAttributes, RestartListsAttributesForListOutdented, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, DismissedCreateLinkInlineDialogAEP, DispatchAnalyticsEvent, EditLinkToolbarAEP, EnteredTextLinkSearchInputAEP, ErrorEventAttributes, ErrorEventPayload, ExperimentalEventPayload, ExtensionEventPayload, ExtensionType, FeatureExposureAEP, FormatEventPayload, GeneralEventPayload, HighlightedSearchResultsAEP, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, InsertSmartLinkAEP, ListEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, MediaResizeTrackAction, MediaInputResizeTrackAction, NodeCount, NodeEventPayload, OperationalAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, PluginMethodReport, PluginPerformanceReportData, PluginsReport, QuickSearchPerfAEP, RecentActivitiesPerfAEP, SelectAllAEP, SelectCellAEP, SelectNodeAEP, SelectRangeAEP, SelectedSearchResultsAEP, SelectionEventPayload, SelectionJson, ShownPostQuerySearchResultsAEP, ShownPreQuerySearchResultsAEP, SimplifiedNode, SmartLinkNodeContext, SubstituteEventPayload, TableEventPayload, TextColorSelectedAEP, TextColorSelectedAttr, TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, ToolbarEventPayload, TransactionEventPayload, TypeAheadPayload, UfoSessionCompletePayloadAEP, UnlinkToolbarAEP, ViewedCreateLinkInlineDialogAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, } from './types';
|
|
3
3
|
export type { EditorAnalyticsAPI } from './api';
|
|
4
|
-
export { fireAnalyticsEvent } from './fire-analytics-event';
|
|
4
|
+
export { editorAnalyticsChannel, fireAnalyticsEvent, } from './fire-analytics-event';
|
|
5
5
|
export { getAnalyticsEventsFromTransaction } from './utils';
|
|
6
6
|
export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload, } from './linking-utils';
|
|
7
7
|
export type { LinkType } from './linking-utils';
|
|
@@ -17,5 +17,5 @@ export type OpenChangedEvent = {
|
|
|
17
17
|
isOpen: boolean;
|
|
18
18
|
event: MouseEvent | KeyboardEvent;
|
|
19
19
|
};
|
|
20
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "id" | "children" | "testId" | "position" | "analyticsContext" | "shouldFitContainer" | "
|
|
20
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "id" | "children" | "testId" | "position" | "analyticsContext" | "shouldFitContainer" | "onPositioned" | "isOpen" | "trigger" | "onOpenChange"> & import("react").RefAttributes<any>>;
|
|
21
21
|
export default _default;
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -40,3 +40,4 @@ export { default as PanelTextInput } from './PanelTextInput';
|
|
|
40
40
|
export { default as Announcer } from './Announcer/announcer';
|
|
41
41
|
export { EDIT_AREA_ID } from './Toolbar';
|
|
42
42
|
export type { UseStickyToolbarType } from './Toolbar';
|
|
43
|
+
export type { OpenChangedEvent } from './DropList';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { PaletteColor, PaletteTooltipMessages } from '../../ui-color';
|
|
5
|
+
type Props = WithAnalyticsEventsProps & {
|
|
6
|
+
currentColor?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
onChange?: (color: PaletteColor) => void;
|
|
9
|
+
colorPalette: PaletteColor[];
|
|
10
|
+
placement: string;
|
|
11
|
+
cols?: number;
|
|
12
|
+
alignX?: 'left' | 'right' | 'center' | 'end';
|
|
13
|
+
size?: {
|
|
14
|
+
width: string;
|
|
15
|
+
height: string;
|
|
16
|
+
};
|
|
17
|
+
mountPoint?: HTMLElement;
|
|
18
|
+
setDisableParentScroll?: (disable: boolean) => void;
|
|
19
|
+
hexToPaletteColor?: (hexColor: string) => string | undefined;
|
|
20
|
+
paletteColorTooltipMessages?: PaletteTooltipMessages;
|
|
21
|
+
/**
|
|
22
|
+
* After picking the color the default behaviour is to focus the color picker button.
|
|
23
|
+
* To prevent this use skipFocusButtonAfterPick.
|
|
24
|
+
*/
|
|
25
|
+
skipFocusButtonAfterPick?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "onChange" | "title" | "key" | "size" | "placement" | "alignX" | "currentColor" | "analyticsContext" | "cols" | "hexToPaletteColor" | "paletteColorTooltipMessages" | "colorPalette" | "mountPoint" | "setDisableParentScroll" | "skipFocusButtonAfterPick"> & React.RefAttributes<any>>;
|
|
28
|
+
export default _default;
|
|
@@ -7,3 +7,5 @@ export { ToolbarArrowKeyNavigationProvider, KeyDownHandlerContext, } from './Too
|
|
|
7
7
|
export { ArrowKeyNavigationType } from './ArrowKeyNavigationProvider/types';
|
|
8
8
|
export { ColorPaletteArrowKeyNavigationProvider } from './ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider';
|
|
9
9
|
export { default as Dropdown } from './Dropdown';
|
|
10
|
+
export { default as ColorPickerButton } from './ColorPickerButton';
|
|
11
|
+
export { DropdownContainer } from './DropdownContainer';
|
|
@@ -83,3 +83,4 @@ export declare function isInEmptyLine(state: EditorState): boolean;
|
|
|
83
83
|
export { dedupe } from './dedupe';
|
|
84
84
|
export { createWrapSelectionTransaction } from './create-wrap-selection-transaction';
|
|
85
85
|
export { wrapSelectionIn } from './wrap-selection-in';
|
|
86
|
+
export { toJSON, nodeToJSON } from './nodes';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSONDocNode, JSONNode } from '@atlaskit/editor-json-transformer';
|
|
1
2
|
import type { Fragment, MarkType, NodeType, Mark as PMMark, Node as PMNode, ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { CardAppearance } from '@atlaskit/smart-card';
|
|
@@ -46,4 +47,6 @@ export declare const isMediaNode: (node: PMNode) => boolean;
|
|
|
46
47
|
* @param state The editor state
|
|
47
48
|
*/
|
|
48
49
|
export declare const isNodeBeforeMediaNode: ($pos: ResolvedPos, state: EditorState) => boolean;
|
|
50
|
+
export declare function toJSON(node: PMNode): JSONDocNode;
|
|
51
|
+
export declare function nodeToJSON(node: PMNode): JSONNode;
|
|
49
52
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, BROWSER_FREEZE_INTERACTION_TYPE, CONTENT_COMPONENT, DELETE_DIRECTION, EVENT_TYPE, FLOATING_CONTROLS_TITLE, FULL_WIDTH_MODE, GAP_CURSOR_POSITION, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LAYOUT_TYPE, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS, MODE, PLATFORMS, PUNC, PasteContents, PasteSources, PasteTypes, RESOLVE_METHOD, SELECTION_TYPE, SELECTION_POSITION, SMART_LINK_TYPE, SYMBOL, SmartLinkNodeContexts, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_CHANGE_TRIGGER, TARGET_SELECTION_SOURCE, TOOLBAR_ACTION_SUBJECT_ID, TRIGGER_METHOD, USER_CONTEXT, } from './types';
|
|
2
2
|
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, AnnotationAEP, AnnotationAEPAttributes, AnnotationActionType, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, CaptionTrackAction, ColorPickerAEP, CommonListAnalyticsAttributes, RestartListsAttributesForListOutdented, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, DismissedCreateLinkInlineDialogAEP, DispatchAnalyticsEvent, EditLinkToolbarAEP, EnteredTextLinkSearchInputAEP, ErrorEventAttributes, ErrorEventPayload, ExperimentalEventPayload, ExtensionEventPayload, ExtensionType, FeatureExposureAEP, FormatEventPayload, GeneralEventPayload, HighlightedSearchResultsAEP, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, InsertSmartLinkAEP, ListEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, MediaResizeTrackAction, MediaInputResizeTrackAction, NodeCount, NodeEventPayload, OperationalAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, PluginMethodReport, PluginPerformanceReportData, PluginsReport, QuickSearchPerfAEP, RecentActivitiesPerfAEP, SelectAllAEP, SelectCellAEP, SelectNodeAEP, SelectRangeAEP, SelectedSearchResultsAEP, SelectionEventPayload, SelectionJson, ShownPostQuerySearchResultsAEP, ShownPreQuerySearchResultsAEP, SimplifiedNode, SmartLinkNodeContext, SubstituteEventPayload, TableEventPayload, TextColorSelectedAEP, TextColorSelectedAttr, TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, ToolbarEventPayload, TransactionEventPayload, TypeAheadPayload, UfoSessionCompletePayloadAEP, UnlinkToolbarAEP, ViewedCreateLinkInlineDialogAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, } from './types';
|
|
3
3
|
export type { EditorAnalyticsAPI } from './api';
|
|
4
|
-
export { fireAnalyticsEvent } from './fire-analytics-event';
|
|
4
|
+
export { editorAnalyticsChannel, fireAnalyticsEvent, } from './fire-analytics-event';
|
|
5
5
|
export { getAnalyticsEventsFromTransaction } from './utils';
|
|
6
6
|
export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload, } from './linking-utils';
|
|
7
7
|
export type { LinkType } from './linking-utils';
|
|
@@ -17,5 +17,5 @@ export type OpenChangedEvent = {
|
|
|
17
17
|
isOpen: boolean;
|
|
18
18
|
event: MouseEvent | KeyboardEvent;
|
|
19
19
|
};
|
|
20
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "id" | "children" | "testId" | "position" | "analyticsContext" | "shouldFitContainer" | "
|
|
20
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "id" | "children" | "testId" | "position" | "analyticsContext" | "shouldFitContainer" | "onPositioned" | "isOpen" | "trigger" | "onOpenChange"> & import("react").RefAttributes<any>>;
|
|
21
21
|
export default _default;
|
|
@@ -40,3 +40,4 @@ export { default as PanelTextInput } from './PanelTextInput';
|
|
|
40
40
|
export { default as Announcer } from './Announcer/announcer';
|
|
41
41
|
export { EDIT_AREA_ID } from './Toolbar';
|
|
42
42
|
export type { UseStickyToolbarType } from './Toolbar';
|
|
43
|
+
export type { OpenChangedEvent } from './DropList';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { PaletteColor, PaletteTooltipMessages } from '../../ui-color';
|
|
5
|
+
type Props = WithAnalyticsEventsProps & {
|
|
6
|
+
currentColor?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
onChange?: (color: PaletteColor) => void;
|
|
9
|
+
colorPalette: PaletteColor[];
|
|
10
|
+
placement: string;
|
|
11
|
+
cols?: number;
|
|
12
|
+
alignX?: 'left' | 'right' | 'center' | 'end';
|
|
13
|
+
size?: {
|
|
14
|
+
width: string;
|
|
15
|
+
height: string;
|
|
16
|
+
};
|
|
17
|
+
mountPoint?: HTMLElement;
|
|
18
|
+
setDisableParentScroll?: (disable: boolean) => void;
|
|
19
|
+
hexToPaletteColor?: (hexColor: string) => string | undefined;
|
|
20
|
+
paletteColorTooltipMessages?: PaletteTooltipMessages;
|
|
21
|
+
/**
|
|
22
|
+
* After picking the color the default behaviour is to focus the color picker button.
|
|
23
|
+
* To prevent this use skipFocusButtonAfterPick.
|
|
24
|
+
*/
|
|
25
|
+
skipFocusButtonAfterPick?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "onChange" | "title" | "key" | "size" | "placement" | "alignX" | "currentColor" | "analyticsContext" | "cols" | "hexToPaletteColor" | "paletteColorTooltipMessages" | "colorPalette" | "mountPoint" | "setDisableParentScroll" | "skipFocusButtonAfterPick"> & React.RefAttributes<any>>;
|
|
28
|
+
export default _default;
|
|
@@ -7,3 +7,5 @@ export { ToolbarArrowKeyNavigationProvider, KeyDownHandlerContext, } from './Too
|
|
|
7
7
|
export { ArrowKeyNavigationType } from './ArrowKeyNavigationProvider/types';
|
|
8
8
|
export { ColorPaletteArrowKeyNavigationProvider } from './ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider';
|
|
9
9
|
export { default as Dropdown } from './Dropdown';
|
|
10
|
+
export { default as ColorPickerButton } from './ColorPickerButton';
|
|
11
|
+
export { DropdownContainer } from './DropdownContainer';
|
|
@@ -83,3 +83,4 @@ export declare function isInEmptyLine(state: EditorState): boolean;
|
|
|
83
83
|
export { dedupe } from './dedupe';
|
|
84
84
|
export { createWrapSelectionTransaction } from './create-wrap-selection-transaction';
|
|
85
85
|
export { wrapSelectionIn } from './wrap-selection-in';
|
|
86
|
+
export { toJSON, nodeToJSON } from './nodes';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSONDocNode, JSONNode } from '@atlaskit/editor-json-transformer';
|
|
1
2
|
import type { Fragment, MarkType, NodeType, Mark as PMMark, Node as PMNode, ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { CardAppearance } from '@atlaskit/smart-card';
|
|
@@ -46,4 +47,6 @@ export declare const isMediaNode: (node: PMNode) => boolean;
|
|
|
46
47
|
* @param state The editor state
|
|
47
48
|
*/
|
|
48
49
|
export declare const isNodeBeforeMediaNode: ($pos: ResolvedPos, state: EditorState) => boolean;
|
|
50
|
+
export declare function toJSON(node: PMNode): JSONDocNode;
|
|
51
|
+
export declare function nodeToJSON(node: PMNode): JSONNode;
|
|
49
52
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "75.
|
|
3
|
+
"version": "75.6.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/"
|
|
@@ -107,11 +107,11 @@
|
|
|
107
107
|
"@atlaskit/media-client": "^24.0.0",
|
|
108
108
|
"@atlaskit/media-picker": "^66.2.0",
|
|
109
109
|
"@atlaskit/mention": "^22.1.0",
|
|
110
|
-
"@atlaskit/menu": "^1.
|
|
110
|
+
"@atlaskit/menu": "^1.11.0",
|
|
111
111
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
112
112
|
"@atlaskit/profilecard": "^19.5.0",
|
|
113
113
|
"@atlaskit/smart-user-picker": "^6.3.0",
|
|
114
|
-
"@atlaskit/spinner": "^15.
|
|
114
|
+
"@atlaskit/spinner": "^15.6.0",
|
|
115
115
|
"@atlaskit/task-decision": "^17.9.0",
|
|
116
116
|
"@atlaskit/textfield": "^5.6.0",
|
|
117
117
|
"@atlaskit/theme": "^12.6.0",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"devDependencies": {
|
|
152
152
|
"@atlaskit/media-core": "^34.1.0",
|
|
153
153
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
154
|
-
"@atlaskit/smart-card": "^26.
|
|
154
|
+
"@atlaskit/smart-card": "^26.28.0",
|
|
155
155
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
156
156
|
"@atlaskit/visual-regression": "*",
|
|
157
157
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|