@atlaskit/editor-plugin-extension 5.4.2 → 5.5.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 +20 -0
- package/dist/cjs/extensionPlugin.js +2 -1
- package/dist/cjs/pm-plugins/main.js +2 -1
- package/dist/es2019/extensionPlugin.js +2 -1
- package/dist/es2019/pm-plugins/main.js +2 -1
- package/dist/esm/extensionPlugin.js +2 -1
- package/dist/esm/pm-plugins/main.js +2 -1
- package/dist/types/extensionPluginType.d.ts +7 -1
- package/dist/types/pm-plugins/main.d.ts +2 -1
- package/dist/types-ts4.5/extensionPluginType.d.ts +7 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 5.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#157313](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/157313)
|
|
8
|
+
[`8f3a2416f23fe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8f3a2416f23fe) -
|
|
9
|
+
[ux] Added a reserved height to the extension NodeWrapper in the editor. An array of
|
|
10
|
+
ExtensionViewportSize is sent from Confluence editor through the plugins into the nodeviews and
|
|
11
|
+
used there. Depending on the array values, a minimum height is set.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 5.4.3
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 5.4.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -77,7 +77,8 @@ var extensionPlugin = exports.extensionPlugin = function extensionPlugin(_ref) {
|
|
|
77
77
|
eventDispatcher = _ref2.eventDispatcher;
|
|
78
78
|
var extensionHandlers = options.extensionHandlers || {};
|
|
79
79
|
return (0, _main.createPlugin)(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, _api, options.useLongPressSelection, {
|
|
80
|
-
appearance: options.appearance
|
|
80
|
+
appearance: options.appearance,
|
|
81
|
+
extensionViewportSizes: options.extensionViewportSizes
|
|
81
82
|
}, featureFlags, options === null || options === void 0 ? void 0 : options.__rendererExtensionOptions);
|
|
82
83
|
}
|
|
83
84
|
}, {
|
|
@@ -177,7 +177,8 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
177
177
|
showContextPanel: false
|
|
178
178
|
});
|
|
179
179
|
var extensionNodeViewOptions = {
|
|
180
|
-
appearance: options.appearance
|
|
180
|
+
appearance: options.appearance,
|
|
181
|
+
extensionViewportSizes: options.extensionViewportSizes
|
|
181
182
|
};
|
|
182
183
|
var macroInteractionDesignFeatureFlags = {
|
|
183
184
|
showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false
|
|
@@ -70,7 +70,8 @@ export const extensionPlugin = ({
|
|
|
70
70
|
}) => {
|
|
71
71
|
const extensionHandlers = options.extensionHandlers || {};
|
|
72
72
|
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, api, options.useLongPressSelection, {
|
|
73
|
-
appearance: options.appearance
|
|
73
|
+
appearance: options.appearance,
|
|
74
|
+
extensionViewportSizes: options.extensionViewportSizes
|
|
74
75
|
}, featureFlags, options === null || options === void 0 ? void 0 : options.__rendererExtensionOptions);
|
|
75
76
|
}
|
|
76
77
|
}, {
|
|
@@ -121,7 +121,8 @@ export const createPlugin = (dispatch, providerFactory, extensionHandlers, porta
|
|
|
121
121
|
showContextPanel: false
|
|
122
122
|
});
|
|
123
123
|
const extensionNodeViewOptions = {
|
|
124
|
-
appearance: options.appearance
|
|
124
|
+
appearance: options.appearance,
|
|
125
|
+
extensionViewportSizes: options.extensionViewportSizes
|
|
125
126
|
};
|
|
126
127
|
const macroInteractionDesignFeatureFlags = {
|
|
127
128
|
showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false
|
|
@@ -69,7 +69,8 @@ export var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
69
69
|
eventDispatcher = _ref2.eventDispatcher;
|
|
70
70
|
var extensionHandlers = options.extensionHandlers || {};
|
|
71
71
|
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, _api, options.useLongPressSelection, {
|
|
72
|
-
appearance: options.appearance
|
|
72
|
+
appearance: options.appearance,
|
|
73
|
+
extensionViewportSizes: options.extensionViewportSizes
|
|
73
74
|
}, featureFlags, options === null || options === void 0 ? void 0 : options.__rendererExtensionOptions);
|
|
74
75
|
}
|
|
75
76
|
}, {
|
|
@@ -170,7 +170,8 @@ export var createPlugin = function createPlugin(dispatch, providerFactory, exten
|
|
|
170
170
|
showContextPanel: false
|
|
171
171
|
});
|
|
172
172
|
var extensionNodeViewOptions = {
|
|
173
|
-
appearance: options.appearance
|
|
173
|
+
appearance: options.appearance,
|
|
174
|
+
extensionViewportSizes: options.extensionViewportSizes
|
|
174
175
|
};
|
|
175
176
|
var macroInteractionDesignFeatureFlags = {
|
|
176
177
|
showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false
|
|
@@ -2,7 +2,7 @@ import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { ExtensionAPI, ExtensionHandlers, ExtensionProvider, Parameters, TransformAfter, TransformBefore, UpdateExtension } from '@atlaskit/editor-common/extensions';
|
|
4
4
|
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { EditorAppearance, ExtensionViewportSize, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
7
|
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
8
8
|
import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
|
|
@@ -48,6 +48,12 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
48
48
|
isAllowedToUseRendererView: (node: ADFEntity) => boolean;
|
|
49
49
|
showUpdated1PBodiedExtensionUI: (node: ADFEntity) => boolean;
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Configuration for extension viewport sizes, used to preload specific heights for Forge extensions.
|
|
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.
|
|
55
|
+
*/
|
|
56
|
+
extensionViewportSizes?: ExtensionViewportSize[];
|
|
51
57
|
}
|
|
52
58
|
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: PmNode, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
53
59
|
export type RunMacroAutoConvert = (state: EditorState, text: string) => PmNode | null;
|
|
@@ -3,7 +3,7 @@ import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-comm
|
|
|
3
3
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
|
-
import type { EditorAppearance, ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { EditorAppearance, ExtensionViewportSize, ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
8
8
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,4 +18,5 @@ export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandle
|
|
|
18
18
|
}) => true | undefined;
|
|
19
19
|
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<ExtensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
|
|
20
20
|
appearance?: EditorAppearance;
|
|
21
|
+
extensionViewportSizes?: ExtensionViewportSize[];
|
|
21
22
|
}, featureFlags?: FeatureFlags, __rendererExtensionOptions?: ExtensionPluginOptions['__rendererExtensionOptions']) => SafePlugin<import("../extensionPluginType").ExtensionState>;
|
|
@@ -2,7 +2,7 @@ import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { ExtensionAPI, ExtensionHandlers, ExtensionProvider, Parameters, TransformAfter, TransformBefore, UpdateExtension } from '@atlaskit/editor-common/extensions';
|
|
4
4
|
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { EditorAppearance, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { EditorAppearance, ExtensionViewportSize, LongPressSelectionPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
7
|
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
8
8
|
import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
|
|
@@ -48,6 +48,12 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
48
48
|
isAllowedToUseRendererView: (node: ADFEntity) => boolean;
|
|
49
49
|
showUpdated1PBodiedExtensionUI: (node: ADFEntity) => boolean;
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Configuration for extension viewport sizes, used to preload specific heights for Forge extensions.
|
|
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.
|
|
55
|
+
*/
|
|
56
|
+
extensionViewportSizes?: ExtensionViewportSize[];
|
|
51
57
|
}
|
|
52
58
|
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: PmNode, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
53
59
|
export type RunMacroAutoConvert = (state: EditorState, text: string) => PmNode | null;
|
|
@@ -3,7 +3,7 @@ import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-comm
|
|
|
3
3
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
|
-
import type { EditorAppearance, ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { EditorAppearance, ExtensionViewportSize, ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
8
8
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -18,4 +18,5 @@ export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandle
|
|
|
18
18
|
}) => true | undefined;
|
|
19
19
|
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<ExtensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
|
|
20
20
|
appearance?: EditorAppearance;
|
|
21
|
+
extensionViewportSizes?: ExtensionViewportSize[];
|
|
21
22
|
}, 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.
|
|
3
|
+
"version": "5.5.0",
|
|
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": "^
|
|
35
|
+
"@atlaskit/editor-common": "^106.1.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": "^26.
|
|
50
|
+
"@atlaskit/icon": "^26.4.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,10 +60,10 @@
|
|
|
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": "^5.
|
|
63
|
+
"@atlaskit/tmp-editor-statsig": "^5.5.0",
|
|
64
64
|
"@atlaskit/toggle": "^15.0.0",
|
|
65
65
|
"@atlaskit/tokens": "^4.9.0",
|
|
66
|
-
"@atlaskit/tooltip": "^20.
|
|
66
|
+
"@atlaskit/tooltip": "^20.2.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@emotion/react": "^11.7.1",
|
|
69
69
|
"bind-event-listener": "^3.0.0",
|