@atlaskit/editor-plugin-extension 5.5.5 → 5.5.7
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/extensionPlugin.js +1 -1
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +11 -3
- package/dist/es2019/extensionPlugin.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +9 -3
- package/dist/esm/extensionPlugin.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +11 -3
- package/dist/types/extensionPluginType.d.ts +4 -5
- package/dist/types/pm-plugins/main.d.ts +3 -2
- package/dist/types-ts4.5/extensionPluginType.d.ts +4 -5
- package/dist/types-ts4.5/pm-plugins/main.d.ts +3 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -81,7 +81,7 @@ var extensionPlugin = exports.extensionPlugin = function extensionPlugin(_ref) {
|
|
|
81
81
|
var extensionHandlers = options.extensionHandlers || {};
|
|
82
82
|
return (0, _main.createPlugin)(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, _api, options.useLongPressSelection, {
|
|
83
83
|
appearance: options.appearance,
|
|
84
|
-
|
|
84
|
+
getExtensionHeight: options.getExtensionHeight
|
|
85
85
|
}, featureFlags, options === null || options === void 0 ? void 0 : options.__rendererExtensionOptions);
|
|
86
86
|
}
|
|
87
87
|
}, {
|
|
@@ -178,7 +178,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
178
178
|
});
|
|
179
179
|
var extensionNodeViewOptions = {
|
|
180
180
|
appearance: options.appearance,
|
|
181
|
-
|
|
181
|
+
getExtensionHeight: options.getExtensionHeight
|
|
182
182
|
};
|
|
183
183
|
var macroInteractionDesignFeatureFlags = {
|
|
184
184
|
showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false
|
|
@@ -12,8 +12,8 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _new = require("@atlaskit/button/new");
|
|
14
14
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
15
|
-
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/
|
|
16
|
-
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/
|
|
15
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
16
|
+
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
|
|
17
17
|
var _colors = require("@atlaskit/theme/colors");
|
|
18
18
|
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); }
|
|
19
19
|
/**
|
|
@@ -80,7 +80,15 @@ function Expand(_ref) {
|
|
|
80
80
|
},
|
|
81
81
|
label: intl.formatMessage(expanded ? _extensions.configPanelMessages.collapse : _extensions.configPanelMessages.expand),
|
|
82
82
|
testId: "form-expand-toggle",
|
|
83
|
-
icon:
|
|
83
|
+
icon: function icon(iconProps) {
|
|
84
|
+
return expanded ? (0, _react2.jsx)(_chevronDown.default, {
|
|
85
|
+
label: iconProps.label,
|
|
86
|
+
size: "small"
|
|
87
|
+
}) : (0, _react2.jsx)(_chevronRight.default, {
|
|
88
|
+
label: iconProps.label,
|
|
89
|
+
size: "small"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
84
92
|
}))), (0, _react2.jsx)("div", {
|
|
85
93
|
"data-testid": "expand-content-container",
|
|
86
94
|
css: expanded ? expandContentContainerVisibleStyles : expandContentContainerHiddenStyles
|
|
@@ -74,7 +74,7 @@ export const extensionPlugin = ({
|
|
|
74
74
|
const extensionHandlers = options.extensionHandlers || {};
|
|
75
75
|
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, api, options.useLongPressSelection, {
|
|
76
76
|
appearance: options.appearance,
|
|
77
|
-
|
|
77
|
+
getExtensionHeight: options.getExtensionHeight
|
|
78
78
|
}, featureFlags, options === null || options === void 0 ? void 0 : options.__rendererExtensionOptions);
|
|
79
79
|
}
|
|
80
80
|
}, {
|
|
@@ -122,7 +122,7 @@ export const createPlugin = (dispatch, providerFactory, extensionHandlers, porta
|
|
|
122
122
|
});
|
|
123
123
|
const extensionNodeViewOptions = {
|
|
124
124
|
appearance: options.appearance,
|
|
125
|
-
|
|
125
|
+
getExtensionHeight: options.getExtensionHeight
|
|
126
126
|
};
|
|
127
127
|
const macroInteractionDesignFeatureFlags = {
|
|
128
128
|
showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false
|
|
@@ -9,8 +9,8 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
10
|
import { IconButton } from '@atlaskit/button/new';
|
|
11
11
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
12
|
-
import ChevronDownIcon from '@atlaskit/icon/
|
|
13
|
-
import ChevronRightIcon from '@atlaskit/icon/
|
|
12
|
+
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
13
|
+
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
14
14
|
import { N40 } from '@atlaskit/theme/colors';
|
|
15
15
|
const expandContainerStyles = css({
|
|
16
16
|
borderBottom: `1px solid ${`var(--ds-border, ${N40})`}`
|
|
@@ -66,7 +66,13 @@ function Expand({
|
|
|
66
66
|
},
|
|
67
67
|
label: intl.formatMessage(expanded ? messages.collapse : messages.expand),
|
|
68
68
|
testId: "form-expand-toggle",
|
|
69
|
-
icon: expanded ? ChevronDownIcon
|
|
69
|
+
icon: iconProps => expanded ? jsx(ChevronDownIcon, {
|
|
70
|
+
label: iconProps.label,
|
|
71
|
+
size: "small"
|
|
72
|
+
}) : jsx(ChevronRightIcon, {
|
|
73
|
+
label: iconProps.label,
|
|
74
|
+
size: "small"
|
|
75
|
+
})
|
|
70
76
|
}))), jsx("div", {
|
|
71
77
|
"data-testid": "expand-content-container",
|
|
72
78
|
css: expanded ? expandContentContainerVisibleStyles : expandContentContainerHiddenStyles
|
|
@@ -73,7 +73,7 @@ export var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
73
73
|
var extensionHandlers = options.extensionHandlers || {};
|
|
74
74
|
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, _api, options.useLongPressSelection, {
|
|
75
75
|
appearance: options.appearance,
|
|
76
|
-
|
|
76
|
+
getExtensionHeight: options.getExtensionHeight
|
|
77
77
|
}, featureFlags, options === null || options === void 0 ? void 0 : options.__rendererExtensionOptions);
|
|
78
78
|
}
|
|
79
79
|
}, {
|
|
@@ -171,7 +171,7 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, exten
|
|
|
171
171
|
});
|
|
172
172
|
var extensionNodeViewOptions = {
|
|
173
173
|
appearance: options.appearance,
|
|
174
|
-
|
|
174
|
+
getExtensionHeight: options.getExtensionHeight
|
|
175
175
|
};
|
|
176
176
|
var macroInteractionDesignFeatureFlags = {
|
|
177
177
|
showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false
|
|
@@ -10,8 +10,8 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import { IconButton } from '@atlaskit/button/new';
|
|
12
12
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
13
|
-
import ChevronDownIcon from '@atlaskit/icon/
|
|
14
|
-
import ChevronRightIcon from '@atlaskit/icon/
|
|
13
|
+
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
14
|
+
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
15
15
|
import { N40 } from '@atlaskit/theme/colors';
|
|
16
16
|
var expandContainerStyles = css({
|
|
17
17
|
borderBottom: "1px solid ".concat("var(--ds-border, ".concat(N40, ")"))
|
|
@@ -70,7 +70,15 @@ function Expand(_ref) {
|
|
|
70
70
|
},
|
|
71
71
|
label: intl.formatMessage(expanded ? messages.collapse : messages.expand),
|
|
72
72
|
testId: "form-expand-toggle",
|
|
73
|
-
icon:
|
|
73
|
+
icon: function icon(iconProps) {
|
|
74
|
+
return expanded ? jsx(ChevronDownIcon, {
|
|
75
|
+
label: iconProps.label,
|
|
76
|
+
size: "small"
|
|
77
|
+
}) : jsx(ChevronRightIcon, {
|
|
78
|
+
label: iconProps.label,
|
|
79
|
+
size: "small"
|
|
80
|
+
});
|
|
81
|
+
}
|
|
74
82
|
}))), jsx("div", {
|
|
75
83
|
"data-testid": "expand-content-container",
|
|
76
84
|
css: expanded ? expandContentContainerVisibleStyles : expandContentContainerHiddenStyles
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { GetPMNodeHeight } from '@atlaskit/editor-common/extensibility';
|
|
3
4
|
import type { ExtensionAPI, ExtensionHandlers, ExtensionProvider, Parameters, TransformAfter, TransformBefore, UpdateExtension } from '@atlaskit/editor-common/extensions';
|
|
4
5
|
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { EditorAppearance,
|
|
6
|
+
import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
6
7
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
8
|
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
8
9
|
import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
|
|
@@ -49,11 +50,9 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
49
50
|
showUpdated1PBodiedExtensionUI: (node: ADFEntity) => boolean;
|
|
50
51
|
};
|
|
51
52
|
/**
|
|
52
|
-
*
|
|
53
|
-
* Each item contains an extensionId and corresponding viewportSize (e.g., 'small', 'large', or custom pixel values like '300px').
|
|
54
|
-
* This helps optimize rendering by setting minimum heights before the extension content loads.
|
|
53
|
+
* Helps optimize layout shift while rendering by setting minimum heights before the extension content loads.
|
|
55
54
|
*/
|
|
56
|
-
|
|
55
|
+
getExtensionHeight?: GetPMNodeHeight;
|
|
57
56
|
}
|
|
58
57
|
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: PmNode, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
59
58
|
export type RunMacroAutoConvert = (state: EditorState, text: string) => PmNode | null;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { GetPMNodeHeight } from '@atlaskit/editor-common/extensibility';
|
|
2
3
|
import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
3
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
|
-
import type { EditorAppearance,
|
|
7
|
+
import type { EditorAppearance, ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
8
|
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
8
9
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
9
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,5 +19,5 @@ export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandle
|
|
|
18
19
|
}) => true | undefined;
|
|
19
20
|
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<ExtensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
|
|
20
21
|
appearance?: EditorAppearance;
|
|
21
|
-
|
|
22
|
+
getExtensionHeight?: GetPMNodeHeight;
|
|
22
23
|
}, featureFlags?: FeatureFlags, __rendererExtensionOptions?: ExtensionPluginOptions['__rendererExtensionOptions']) => SafePlugin<import("../extensionPluginType").ExtensionState>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { GetPMNodeHeight } from '@atlaskit/editor-common/extensibility';
|
|
3
4
|
import type { ExtensionAPI, ExtensionHandlers, ExtensionProvider, Parameters, TransformAfter, TransformBefore, UpdateExtension } from '@atlaskit/editor-common/extensions';
|
|
4
5
|
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { EditorAppearance,
|
|
6
|
+
import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
6
7
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
8
|
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
8
9
|
import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
|
|
@@ -49,11 +50,9 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
49
50
|
showUpdated1PBodiedExtensionUI: (node: ADFEntity) => boolean;
|
|
50
51
|
};
|
|
51
52
|
/**
|
|
52
|
-
*
|
|
53
|
-
* Each item contains an extensionId and corresponding viewportSize (e.g., 'small', 'large', or custom pixel values like '300px').
|
|
54
|
-
* This helps optimize rendering by setting minimum heights before the extension content loads.
|
|
53
|
+
* Helps optimize layout shift while rendering by setting minimum heights before the extension content loads.
|
|
55
54
|
*/
|
|
56
|
-
|
|
55
|
+
getExtensionHeight?: GetPMNodeHeight;
|
|
57
56
|
}
|
|
58
57
|
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: PmNode, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
59
58
|
export type RunMacroAutoConvert = (state: EditorState, text: string) => PmNode | null;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { GetPMNodeHeight } from '@atlaskit/editor-common/extensibility';
|
|
2
3
|
import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
3
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
|
-
import type { EditorAppearance,
|
|
7
|
+
import type { EditorAppearance, ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
8
|
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
8
9
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
9
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,5 +19,5 @@ export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandle
|
|
|
18
19
|
}) => true | undefined;
|
|
19
20
|
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<ExtensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
|
|
20
21
|
appearance?: EditorAppearance;
|
|
21
|
-
|
|
22
|
+
getExtensionHeight?: GetPMNodeHeight;
|
|
22
23
|
}, featureFlags?: FeatureFlags, __rendererExtensionOptions?: ExtensionPluginOptions['__rendererExtensionOptions']) => SafePlugin<import("../extensionPluginType").ExtensionState>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.7",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/button": "^23.2.0",
|
|
33
33
|
"@atlaskit/checkbox": "^17.1.0",
|
|
34
34
|
"@atlaskit/datetime-picker": "^17.0.0",
|
|
35
|
-
"@atlaskit/editor-common": "^106.
|
|
35
|
+
"@atlaskit/editor-common": "^106.9.0",
|
|
36
36
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/empty-state": "^10.0.0",
|
|
48
48
|
"@atlaskit/form": "^12.0.0",
|
|
49
49
|
"@atlaskit/heading": "^5.2.0",
|
|
50
|
-
"@atlaskit/icon": "^
|
|
50
|
+
"@atlaskit/icon": "^27.0.0",
|
|
51
51
|
"@atlaskit/link": "^3.2.0",
|
|
52
52
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
53
53
|
"@atlaskit/primitives": "^14.8.0",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@atlaskit/textarea": "^8.0.0",
|
|
61
61
|
"@atlaskit/textfield": "^8.0.0",
|
|
62
62
|
"@atlaskit/theme": "^18.0.0",
|
|
63
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
63
|
+
"@atlaskit/tmp-editor-statsig": "^7.1.0",
|
|
64
64
|
"@atlaskit/toggle": "^15.0.0",
|
|
65
|
-
"@atlaskit/tokens": "^5.
|
|
65
|
+
"@atlaskit/tokens": "^5.2.0",
|
|
66
66
|
"@atlaskit/tooltip": "^20.3.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|