@atlaskit/editor-presets 5.2.3 → 6.0.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 +61 -0
- package/dist/cjs/confluence-full-page-base/index.js +1 -3
- package/dist/cjs/confluence-full-page-base/pluginOptions/basePluginOptions.js +2 -5
- package/dist/cjs/confluence-full-page-base/pluginOptions/contextPanelPluginOptions.js +1 -2
- package/dist/cjs/confluence-full-page-base/pluginOptions/loomPluginOptions.js +1 -2
- package/dist/es2019/confluence-full-page-base/index.js +1 -3
- package/dist/es2019/confluence-full-page-base/pluginOptions/basePluginOptions.js +2 -6
- package/dist/es2019/confluence-full-page-base/pluginOptions/contextPanelPluginOptions.js +1 -2
- package/dist/es2019/confluence-full-page-base/pluginOptions/loomPluginOptions.js +1 -2
- package/dist/esm/confluence-full-page-base/index.js +1 -3
- package/dist/esm/confluence-full-page-base/pluginOptions/basePluginOptions.js +2 -5
- package/dist/esm/confluence-full-page-base/pluginOptions/contextPanelPluginOptions.js +1 -2
- package/dist/esm/confluence-full-page-base/pluginOptions/loomPluginOptions.js +1 -2
- package/dist/types/confluence-full-page-base/pluginOptions/basePluginOptions.d.ts +1 -7
- package/dist/types/confluence-full-page-base/types.d.ts +1 -2
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# @atlaskit/editor-presets
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`2cfc0f295c39a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2cfc0f295c39a) -
|
|
8
|
+
[ux] FG cleanup - Removes `confluence_frontend_content_wrapper` from platform (treated as
|
|
9
|
+
permanently launched / implicitly true).
|
|
10
|
+
|
|
11
|
+
## Breaking change
|
|
12
|
+
|
|
13
|
+
The `confluence_frontend_content_wrapper` gate previously guarded a scroll-gutter tweak in
|
|
14
|
+
`basePluginOptions` that only read the `base` builder's `__livePage` field. With the gate
|
|
15
|
+
launched, that field is no longer read, so the now-dead `base` option was removed rather than left
|
|
16
|
+
as vestigial API.
|
|
17
|
+
|
|
18
|
+
For `@atlaskit/editor-presets` (published):
|
|
19
|
+
- The `base` option was removed from the public preset plugin options type
|
|
20
|
+
(`AllPublicPluginOptions.base` is now `never`).
|
|
21
|
+
- `basePluginOptions()` no longer takes an argument (was `basePluginOptions({ options })`).
|
|
22
|
+
|
|
23
|
+
This is a **type-level** breaking change only. At runtime it is a no-op: the `base` option (and
|
|
24
|
+
the `__livePage` value passed through it) was already unused once the gate was on, so removing it
|
|
25
|
+
does not change editor behaviour. It is scored `major` for `@atlaskit/editor-presets` because that
|
|
26
|
+
package is published and the type contract change will break the builds of external TypeScript
|
|
27
|
+
consumers that still pass `base`. `@atlassian/confluence-presets` is `private` (not published) and
|
|
28
|
+
receives the same code change, so it is scored `minor`.
|
|
29
|
+
|
|
30
|
+
## Migration
|
|
31
|
+
|
|
32
|
+
Stop passing the `base` option to the preset, and call `basePluginOptions()` with no arguments:
|
|
33
|
+
|
|
34
|
+
```diff
|
|
35
|
+
fullPagePreset({
|
|
36
|
+
intl,
|
|
37
|
+
pluginOptions: {
|
|
38
|
+
- base: { __livePage },
|
|
39
|
+
// ...other plugin options unchanged
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```diff
|
|
45
|
+
- basePluginOptions({ options: { __livePage } });
|
|
46
|
+
+ basePluginOptions();
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Note: `__livePage` itself is not removed — it remains a valid, live field on the other plugin
|
|
50
|
+
option builders (e.g. `selection`, `selectionMarker`, `collabEdit`, `card`). Only the unused
|
|
51
|
+
`base.__livePage` passthrough is gone. All in-repo consumers have been migrated as part of this
|
|
52
|
+
PR.
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependencies
|
|
57
|
+
|
|
58
|
+
## 5.2.4
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Updated dependencies
|
|
63
|
+
|
|
3
64
|
## 5.2.3
|
|
4
65
|
|
|
5
66
|
### Patch Changes
|
|
@@ -197,9 +197,7 @@ function confluenceFullPageBasePreset(props) {
|
|
|
197
197
|
})]).add(_editorPluginClipboard.clipboardPlugin).add(_editorPluginFocus.focusPlugin).add(_editorPluginComposition.compositionPlugin).add([_editorPluginContextIdentifier.contextIdentifierPlugin, (0, _contextIdentifierPluginOptions.contextIdentifierPluginOptions)({
|
|
198
198
|
options: pluginOptions.contextIdentifier,
|
|
199
199
|
providers: providers
|
|
200
|
-
})]).add([_editorPluginBase.basePlugin, (0, _basePluginOptions.basePluginOptions)({
|
|
201
|
-
options: pluginOptions.base
|
|
202
|
-
})]).maybeAdd([_editorPluginUserPreferences.userPreferencesPlugin, (0, _userPreferencesPluginOptions.userPreferencesPluginOptions)({
|
|
200
|
+
})]).add([_editorPluginBase.basePlugin, (0, _basePluginOptions.basePluginOptions)()]).maybeAdd([_editorPluginUserPreferences.userPreferencesPlugin, (0, _userPreferencesPluginOptions.userPreferencesPluginOptions)({
|
|
203
201
|
providers: providers,
|
|
204
202
|
options: pluginOptions.userPreferencesPlugin
|
|
205
203
|
})], enabledOptionalPlugins.userPreferences).add(_editorPluginDecorations.decorationsPlugin).add([_editorPluginTypeAhead.typeAheadPlugin, (0, _typeAheadPluginOptions.typeAheadPluginOptions)({
|
|
@@ -4,13 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.basePluginOptions = basePluginOptions;
|
|
7
|
-
|
|
8
|
-
function basePluginOptions(_ref) {
|
|
9
|
-
var options = _ref.options;
|
|
10
|
-
var removeScrollGutter = !(0, _platformFeatureFlags.fg)('confluence_frontend_content_wrapper') && options.__livePage;
|
|
7
|
+
function basePluginOptions() {
|
|
11
8
|
return {
|
|
12
9
|
allowInlineCursorTarget: true,
|
|
13
|
-
allowScrollGutter:
|
|
10
|
+
allowScrollGutter: {
|
|
14
11
|
getScrollElement: function getScrollElement() {
|
|
15
12
|
return document.querySelector('.fabric-editor-popup-scroll-parent');
|
|
16
13
|
}
|
|
@@ -13,8 +13,7 @@ function contextPanelPluginOptions(_ref) {
|
|
|
13
13
|
return (
|
|
14
14
|
// SECTION: From confluence/next/packages/editor-presets/src/full-page/useFullPageEditorPreset.ts
|
|
15
15
|
// If object-sidebar is not enabled, then we don't need to pass the contextPanelOptions
|
|
16
|
-
|
|
17
|
-
(0, _platformFeatureFlags.fg)('confluence_frontend_content_wrapper') && (0, _platformFeatureFlags.fg)('platform_editor_ai_object_sidebar_injection') ? {
|
|
16
|
+
(0, _platformFeatureFlags.fg)('platform_editor_ai_object_sidebar_injection') ? {
|
|
18
17
|
objectSideBar: options.objectSideBar
|
|
19
18
|
} : undefined
|
|
20
19
|
// END SECTION
|
|
@@ -4,13 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.loomPluginOptions = loomPluginOptions;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
function loomPluginOptions(_ref) {
|
|
9
8
|
var options = _ref.options;
|
|
10
9
|
return {
|
|
11
10
|
// SECTION: From confluence/next/packages/loom-editor-utils/src/hooks/useLoomPluginOptions.tsx
|
|
12
11
|
renderButton: options.renderButton,
|
|
13
|
-
shouldShowToolbarButton:
|
|
12
|
+
shouldShowToolbarButton: false
|
|
14
13
|
// END SECTION
|
|
15
14
|
};
|
|
16
15
|
}
|
|
@@ -193,9 +193,7 @@ export function confluenceFullPageBasePreset(props) {
|
|
|
193
193
|
})]).add(clipboardPlugin).add(focusPlugin).add(compositionPlugin).add([contextIdentifierPlugin, contextIdentifierPluginOptions({
|
|
194
194
|
options: pluginOptions.contextIdentifier,
|
|
195
195
|
providers
|
|
196
|
-
})]).add([basePlugin, basePluginOptions({
|
|
197
|
-
options: pluginOptions.base
|
|
198
|
-
})]).maybeAdd([userPreferencesPlugin, userPreferencesPluginOptions({
|
|
196
|
+
})]).add([basePlugin, basePluginOptions()]).maybeAdd([userPreferencesPlugin, userPreferencesPluginOptions({
|
|
199
197
|
providers,
|
|
200
198
|
options: pluginOptions.userPreferencesPlugin
|
|
201
199
|
})], enabledOptionalPlugins.userPreferences).add(decorationsPlugin).add([typeAheadPlugin, typeAheadPluginOptions({
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export function basePluginOptions({
|
|
3
|
-
options
|
|
4
|
-
}) {
|
|
5
|
-
const removeScrollGutter = !fg('confluence_frontend_content_wrapper') && options.__livePage;
|
|
1
|
+
export function basePluginOptions() {
|
|
6
2
|
return {
|
|
7
3
|
allowInlineCursorTarget: true,
|
|
8
|
-
allowScrollGutter:
|
|
4
|
+
allowScrollGutter: {
|
|
9
5
|
getScrollElement: () => document.querySelector('.fabric-editor-popup-scroll-parent')
|
|
10
6
|
}
|
|
11
7
|
};
|
|
@@ -8,8 +8,7 @@ export function contextPanelPluginOptions({
|
|
|
8
8
|
return (
|
|
9
9
|
// SECTION: From confluence/next/packages/editor-presets/src/full-page/useFullPageEditorPreset.ts
|
|
10
10
|
// If object-sidebar is not enabled, then we don't need to pass the contextPanelOptions
|
|
11
|
-
|
|
12
|
-
fg('confluence_frontend_content_wrapper') && fg('platform_editor_ai_object_sidebar_injection') ? {
|
|
11
|
+
fg('platform_editor_ai_object_sidebar_injection') ? {
|
|
13
12
|
objectSideBar: options.objectSideBar
|
|
14
13
|
} : undefined
|
|
15
14
|
// END SECTION
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
export function loomPluginOptions({
|
|
3
2
|
options
|
|
4
3
|
}) {
|
|
5
4
|
return {
|
|
6
5
|
// SECTION: From confluence/next/packages/loom-editor-utils/src/hooks/useLoomPluginOptions.tsx
|
|
7
6
|
renderButton: options.renderButton,
|
|
8
|
-
shouldShowToolbarButton:
|
|
7
|
+
shouldShowToolbarButton: false
|
|
9
8
|
// END SECTION
|
|
10
9
|
};
|
|
11
10
|
}
|
|
@@ -191,9 +191,7 @@ export function confluenceFullPageBasePreset(props) {
|
|
|
191
191
|
})]).add(clipboardPlugin).add(focusPlugin).add(compositionPlugin).add([contextIdentifierPlugin, contextIdentifierPluginOptions({
|
|
192
192
|
options: pluginOptions.contextIdentifier,
|
|
193
193
|
providers: providers
|
|
194
|
-
})]).add([basePlugin, basePluginOptions({
|
|
195
|
-
options: pluginOptions.base
|
|
196
|
-
})]).maybeAdd([userPreferencesPlugin, userPreferencesPluginOptions({
|
|
194
|
+
})]).add([basePlugin, basePluginOptions()]).maybeAdd([userPreferencesPlugin, userPreferencesPluginOptions({
|
|
197
195
|
providers: providers,
|
|
198
196
|
options: pluginOptions.userPreferencesPlugin
|
|
199
197
|
})], enabledOptionalPlugins.userPreferences).add(decorationsPlugin).add([typeAheadPlugin, typeAheadPluginOptions({
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export function basePluginOptions(_ref) {
|
|
3
|
-
var options = _ref.options;
|
|
4
|
-
var removeScrollGutter = !fg('confluence_frontend_content_wrapper') && options.__livePage;
|
|
1
|
+
export function basePluginOptions() {
|
|
5
2
|
return {
|
|
6
3
|
allowInlineCursorTarget: true,
|
|
7
|
-
allowScrollGutter:
|
|
4
|
+
allowScrollGutter: {
|
|
8
5
|
getScrollElement: function getScrollElement() {
|
|
9
6
|
return document.querySelector('.fabric-editor-popup-scroll-parent');
|
|
10
7
|
}
|
|
@@ -7,8 +7,7 @@ export function contextPanelPluginOptions(_ref) {
|
|
|
7
7
|
return (
|
|
8
8
|
// SECTION: From confluence/next/packages/editor-presets/src/full-page/useFullPageEditorPreset.ts
|
|
9
9
|
// If object-sidebar is not enabled, then we don't need to pass the contextPanelOptions
|
|
10
|
-
|
|
11
|
-
fg('confluence_frontend_content_wrapper') && fg('platform_editor_ai_object_sidebar_injection') ? {
|
|
10
|
+
fg('platform_editor_ai_object_sidebar_injection') ? {
|
|
12
11
|
objectSideBar: options.objectSideBar
|
|
13
12
|
} : undefined
|
|
14
13
|
// END SECTION
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
export function loomPluginOptions(_ref) {
|
|
3
2
|
var options = _ref.options;
|
|
4
3
|
return {
|
|
5
4
|
// SECTION: From confluence/next/packages/loom-editor-utils/src/hooks/useLoomPluginOptions.tsx
|
|
6
5
|
renderButton: options.renderButton,
|
|
7
|
-
shouldShowToolbarButton:
|
|
6
|
+
shouldShowToolbarButton: false
|
|
8
7
|
// END SECTION
|
|
9
8
|
};
|
|
10
9
|
}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
import type { BasePluginOptions } from '@atlaskit/editor-plugin-base';
|
|
2
|
-
|
|
3
|
-
options: {
|
|
4
|
-
__livePage?: boolean;
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export declare function basePluginOptions({ options }: Props): BasePluginOptions;
|
|
8
|
-
export {};
|
|
2
|
+
export declare function basePluginOptions(): BasePluginOptions;
|
|
@@ -106,7 +106,6 @@ import type { agentManagedExtensionPluginOptions } from './pluginOptions/agentMa
|
|
|
106
106
|
import type { analyticsPluginOptions } from './pluginOptions/analyticsPluginOptions';
|
|
107
107
|
import type { annotationPluginOptions } from './pluginOptions/annotationPluginOptions';
|
|
108
108
|
import type { avatarGroupPluginOptions } from './pluginOptions/avatarGroupPluginOptions';
|
|
109
|
-
import type { basePluginOptions } from './pluginOptions/basePluginOptions';
|
|
110
109
|
import type { blockMenuPluginOptions } from './pluginOptions/blockMenuPluginOptions';
|
|
111
110
|
import type { blockTypePluginOptions } from './pluginOptions/blockTypePluginOptions';
|
|
112
111
|
import type { breakoutPluginOptions } from './pluginOptions/breakoutPluginOptions';
|
|
@@ -321,7 +320,7 @@ export interface AllPublicPluginOptions {
|
|
|
321
320
|
analytics: OptionsFromPluginOptionsBuilder<typeof analyticsPluginOptions>;
|
|
322
321
|
annotation: OptionsFromPluginOptionsBuilder<typeof annotationPluginOptions>;
|
|
323
322
|
avatarGroup: OptionsFromPluginOptionsBuilder<typeof avatarGroupPluginOptions>;
|
|
324
|
-
base:
|
|
323
|
+
base: never;
|
|
325
324
|
batchAttributeUpdates: never;
|
|
326
325
|
betterTypeHistory: never;
|
|
327
326
|
blockControls: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-presets",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Public editor presets for Atlassian Editor containing base configurations for Confluence and other products",
|
|
6
6
|
"publishConfig": {
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@atlaskit/editor-plugin-selection-extension": "^15.0.0",
|
|
96
96
|
"@atlaskit/editor-plugin-selection-marker": "^12.0.0",
|
|
97
97
|
"@atlaskit/editor-plugin-selection-toolbar": "^13.0.0",
|
|
98
|
-
"@atlaskit/editor-plugin-show-diff": "^10.
|
|
98
|
+
"@atlaskit/editor-plugin-show-diff": "^10.5.0",
|
|
99
99
|
"@atlaskit/editor-plugin-status": "^13.1.0",
|
|
100
100
|
"@atlaskit/editor-plugin-submit-editor": "^12.0.0",
|
|
101
101
|
"@atlaskit/editor-plugin-synced-block": "^10.3.0",
|
|
@@ -114,14 +114,14 @@
|
|
|
114
114
|
"@atlaskit/editor-plugin-user-intent": "^10.0.0",
|
|
115
115
|
"@atlaskit/editor-plugin-user-preferences": "^10.0.0",
|
|
116
116
|
"@atlaskit/editor-plugin-width": "^13.0.0",
|
|
117
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
118
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
117
|
+
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
118
|
+
"@atlaskit/tmp-editor-statsig": "^130.2.0",
|
|
119
119
|
"@atlassian/ari": "^2.596.0",
|
|
120
120
|
"@atlassian/editor-plugin-agent-managed-extension": "^2.12.0",
|
|
121
121
|
"@babel/runtime": "^7.0.0"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
|
-
"@atlaskit/editor-common": "^116.
|
|
124
|
+
"@atlaskit/editor-common": "^116.34.0",
|
|
125
125
|
"react": "^18.2.0",
|
|
126
126
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
127
127
|
},
|
|
@@ -164,9 +164,6 @@
|
|
|
164
164
|
"platform_editor_ai_object_sidebar_injection": {
|
|
165
165
|
"type": "boolean"
|
|
166
166
|
},
|
|
167
|
-
"confluence_frontend_content_wrapper": {
|
|
168
|
-
"type": "boolean"
|
|
169
|
-
},
|
|
170
167
|
"platform_editor_content_mode_button_mvp": {
|
|
171
168
|
"type": "boolean"
|
|
172
169
|
},
|