@atlaskit/editor-presets 3.0.1 → 3.1.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-presets
2
2
 
3
+ ## 3.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`136d15a32935f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/136d15a32935f) -
8
+ [ux] Adding initial scaffolding (non-functional) for agent-managed blocks as an editor
9
+ extension/plugin and use in Confluence
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 3.0.1
4
16
 
5
17
  ### Patch Changes
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "extends": "../../../../tsconfig.local-consumption.json",
3
3
  "compilerOptions": {
4
- "target": "es5",
5
4
  "outDir": "../../../../../confluence/tsDist/@atlaskit__editor-presets",
6
5
  "rootDir": "../",
7
6
  "composite": true,
@@ -307,6 +306,9 @@
307
306
  {
308
307
  "path": "../../tmp-editor-statsig/afm-cc/tsconfig.json"
309
308
  },
309
+ {
310
+ "path": "../../../confluence/editor-plugin-agent-managed-extension/afm-cc/tsconfig.json"
311
+ },
310
312
  {
311
313
  "path": "../../editor-common/afm-cc/tsconfig.json"
312
314
  }
@@ -102,6 +102,8 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
102
102
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
103
103
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
104
104
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
105
+ var _editorPluginAgentManagedExtension = require("@atlassian/editor-plugin-agent-managed-extension");
106
+ var _agentManagedExtensionPluginOptions = require("./pluginOptions/agentManagedExtensionPluginOptions");
105
107
  var _analyticsPluginOptions = require("./pluginOptions/analyticsPluginOptions");
106
108
  var _annotationPluginOptions = require("./pluginOptions/annotationPluginOptions");
107
109
  var _avatarGroupPluginOptions = require("./pluginOptions/avatarGroupPluginOptions");
@@ -268,7 +270,9 @@ function confluenceFullPageBasePreset(props) {
268
270
  options: pluginOptions.contextPanel
269
271
  })]).add([_editorPluginExtension.extensionPlugin, (0, _extensionPluginOptions.extensionPluginOptions)({
270
272
  options: pluginOptions.extension
271
- })]).add([_editorPluginDate.datePlugin, (0, _datePluginOptions.datePluginOptions)({
273
+ })]).maybeAdd([_editorPluginAgentManagedExtension.agentManagedExtensionPlugin, (0, _agentManagedExtensionPluginOptions.agentManagedExtensionPluginOptions)({
274
+ options: pluginOptions.agentManagedExtension
275
+ })], (0, _expValEqualsNoExposure.expValEqualsNoExposure)('agent-managed_blocks_mvp', 'isEnabled', true)).add([_editorPluginDate.datePlugin, (0, _datePluginOptions.datePluginOptions)({
272
276
  options: pluginOptions.date
273
277
  })]).add([_editorPluginPlaceholderText.placeholderTextPlugin, (0, _placeholderTextPluginOptions.placeholderTextPluginOptions)({
274
278
  options: pluginOptions.placeholderText
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.agentManagedExtensionPluginOptions = agentManagedExtensionPluginOptions;
7
+ /**
8
+ * Plugin options for the agent-managed extension (block) plugin
9
+ *
10
+ * @param options - configuration to be provided into the plugin
11
+ * @param options.options - (optional) nested plugin configuration
12
+ */
13
+ function agentManagedExtensionPluginOptions(_ref) {
14
+ var options = _ref.options;
15
+ return {
16
+ extensionType: options === null || options === void 0 ? void 0 : options.extensionType
17
+ };
18
+ }
@@ -96,6 +96,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
96
96
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
97
97
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
98
98
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
99
+ import { agentManagedExtensionPlugin } from '@atlassian/editor-plugin-agent-managed-extension';
100
+ import { agentManagedExtensionPluginOptions } from './pluginOptions/agentManagedExtensionPluginOptions';
99
101
  import { analyticsPluginOptions } from './pluginOptions/analyticsPluginOptions';
100
102
  import { annotationPluginOptions } from './pluginOptions/annotationPluginOptions';
101
103
  import { avatarGroupPluginOptions } from './pluginOptions/avatarGroupPluginOptions';
@@ -264,7 +266,9 @@ export function confluenceFullPageBasePreset(props) {
264
266
  options: pluginOptions.contextPanel
265
267
  })]).add([extensionPlugin, extensionPluginOptions({
266
268
  options: pluginOptions.extension
267
- })]).add([datePlugin, datePluginOptions({
269
+ })]).maybeAdd([agentManagedExtensionPlugin, agentManagedExtensionPluginOptions({
270
+ options: pluginOptions.agentManagedExtension
271
+ })], expValEqualsNoExposure('agent-managed_blocks_mvp', 'isEnabled', true)).add([datePlugin, datePluginOptions({
268
272
  options: pluginOptions.date
269
273
  })]).add([placeholderTextPlugin, placeholderTextPluginOptions({
270
274
  options: pluginOptions.placeholderText
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Plugin options for the agent-managed extension (block) plugin
3
+ *
4
+ * @param options - configuration to be provided into the plugin
5
+ * @param options.options - (optional) nested plugin configuration
6
+ */
7
+ export function agentManagedExtensionPluginOptions({
8
+ options
9
+ }) {
10
+ return {
11
+ extensionType: options === null || options === void 0 ? void 0 : options.extensionType
12
+ };
13
+ }
@@ -96,6 +96,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
96
96
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
97
97
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
98
98
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
99
+ import { agentManagedExtensionPlugin } from '@atlassian/editor-plugin-agent-managed-extension';
100
+ import { agentManagedExtensionPluginOptions } from './pluginOptions/agentManagedExtensionPluginOptions';
99
101
  import { analyticsPluginOptions } from './pluginOptions/analyticsPluginOptions';
100
102
  import { annotationPluginOptions } from './pluginOptions/annotationPluginOptions';
101
103
  import { avatarGroupPluginOptions } from './pluginOptions/avatarGroupPluginOptions';
@@ -262,7 +264,9 @@ export function confluenceFullPageBasePreset(props) {
262
264
  options: pluginOptions.contextPanel
263
265
  })]).add([extensionPlugin, extensionPluginOptions({
264
266
  options: pluginOptions.extension
265
- })]).add([datePlugin, datePluginOptions({
267
+ })]).maybeAdd([agentManagedExtensionPlugin, agentManagedExtensionPluginOptions({
268
+ options: pluginOptions.agentManagedExtension
269
+ })], expValEqualsNoExposure('agent-managed_blocks_mvp', 'isEnabled', true)).add([datePlugin, datePluginOptions({
266
270
  options: pluginOptions.date
267
271
  })]).add([placeholderTextPlugin, placeholderTextPluginOptions({
268
272
  options: pluginOptions.placeholderText
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Plugin options for the agent-managed extension (block) plugin
3
+ *
4
+ * @param options - configuration to be provided into the plugin
5
+ * @param options.options - (optional) nested plugin configuration
6
+ */
7
+ export function agentManagedExtensionPluginOptions(_ref) {
8
+ var options = _ref.options;
9
+ return {
10
+ extensionType: options === null || options === void 0 ? void 0 : options.extensionType
11
+ };
12
+ }
@@ -0,0 +1,20 @@
1
+ import type { AgentManagedExtensionPluginOptions } from '@atlassian/editor-plugin-agent-managed-extension';
2
+ interface Props {
3
+ options?: {
4
+ /**
5
+ * Optional override of the extension type used for newly inserted
6
+ * agent-managed bodied extensions.
7
+ *
8
+ * Defaults to `com.atlassian.confluence.macro.core`.
9
+ */
10
+ extensionType?: string;
11
+ };
12
+ }
13
+ /**
14
+ * Plugin options for the agent-managed extension (block) plugin
15
+ *
16
+ * @param options - configuration to be provided into the plugin
17
+ * @param options.options - (optional) nested plugin configuration
18
+ */
19
+ export declare function agentManagedExtensionPluginOptions({ options, }: Props): AgentManagedExtensionPluginOptions;
20
+ export {};
@@ -100,6 +100,8 @@ import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
100
100
  import type { EmojiProvider } from '@atlaskit/emoji';
101
101
  import type { MentionProvider } from '@atlaskit/mention/types';
102
102
  import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
103
+ import type { AgentManagedExtensionPlugin } from '@atlassian/editor-plugin-agent-managed-extension';
104
+ import type { agentManagedExtensionPluginOptions } from './pluginOptions/agentManagedExtensionPluginOptions';
103
105
  import type { analyticsPluginOptions } from './pluginOptions/analyticsPluginOptions';
104
106
  import type { annotationPluginOptions } from './pluginOptions/annotationPluginOptions';
105
107
  import type { avatarGroupPluginOptions } from './pluginOptions/avatarGroupPluginOptions';
@@ -240,6 +242,7 @@ export type ConfluenceFullPageBasePluginsReversed = [
240
242
  LayoutPlugin,
241
243
  PlaceholderTextPlugin,
242
244
  DatePlugin,
245
+ AgentManagedExtensionPlugin | undefined,
243
246
  ExtensionPlugin,
244
247
  ContextPanelPlugin,
245
248
  PanelPlugin,
@@ -312,6 +315,7 @@ export type ConfluenceFullPageBasePresetBuilder = EditorPresetBuilder<ExtractPlu
312
315
  */
313
316
  export interface AllPublicPluginOptions {
314
317
  accessibilityUtils: never;
318
+ agentManagedExtension: OptionsFromPluginOptionsBuilder<typeof agentManagedExtensionPluginOptions>;
315
319
  alignment: never;
316
320
  analytics: OptionsFromPluginOptionsBuilder<typeof analyticsPluginOptions>;
317
321
  annotation: OptionsFromPluginOptionsBuilder<typeof annotationPluginOptions>;
@@ -0,0 +1,20 @@
1
+ import type { AgentManagedExtensionPluginOptions } from '@atlassian/editor-plugin-agent-managed-extension';
2
+ interface Props {
3
+ options?: {
4
+ /**
5
+ * Optional override of the extension type used for newly inserted
6
+ * agent-managed bodied extensions.
7
+ *
8
+ * Defaults to `com.atlassian.confluence.macro.core`.
9
+ */
10
+ extensionType?: string;
11
+ };
12
+ }
13
+ /**
14
+ * Plugin options for the agent-managed extension (block) plugin
15
+ *
16
+ * @param options - configuration to be provided into the plugin
17
+ * @param options.options - (optional) nested plugin configuration
18
+ */
19
+ export declare function agentManagedExtensionPluginOptions({ options, }: Props): AgentManagedExtensionPluginOptions;
20
+ export {};
@@ -100,6 +100,8 @@ import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
100
100
  import type { EmojiProvider } from '@atlaskit/emoji';
101
101
  import type { MentionProvider } from '@atlaskit/mention/types';
102
102
  import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
103
+ import type { AgentManagedExtensionPlugin } from '@atlassian/editor-plugin-agent-managed-extension';
104
+ import type { agentManagedExtensionPluginOptions } from './pluginOptions/agentManagedExtensionPluginOptions';
103
105
  import type { analyticsPluginOptions } from './pluginOptions/analyticsPluginOptions';
104
106
  import type { annotationPluginOptions } from './pluginOptions/annotationPluginOptions';
105
107
  import type { avatarGroupPluginOptions } from './pluginOptions/avatarGroupPluginOptions';
@@ -246,6 +248,7 @@ export type ConfluenceFullPageBasePluginsReversed = [
246
248
  LayoutPlugin,
247
249
  PlaceholderTextPlugin,
248
250
  DatePlugin,
251
+ AgentManagedExtensionPlugin | undefined,
249
252
  ExtensionPlugin,
250
253
  ContextPanelPlugin,
251
254
  PanelPlugin,
@@ -318,6 +321,7 @@ export type ConfluenceFullPageBasePresetBuilder = EditorPresetBuilder<ExtractPlu
318
321
  */
319
322
  export interface AllPublicPluginOptions {
320
323
  accessibilityUtils: never;
324
+ agentManagedExtension: OptionsFromPluginOptionsBuilder<typeof agentManagedExtensionPluginOptions>;
321
325
  alignment: never;
322
326
  analytics: OptionsFromPluginOptionsBuilder<typeof analyticsPluginOptions>;
323
327
  annotation: OptionsFromPluginOptionsBuilder<typeof annotationPluginOptions>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-presets",
3
- "version": "3.0.1",
3
+ "version": "3.1.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": {
@@ -66,9 +66,9 @@
66
66
  "@atlaskit/editor-plugin-editor-viewmode-effects": "^10.0.0",
67
67
  "@atlaskit/editor-plugin-emoji": "^11.0.0",
68
68
  "@atlaskit/editor-plugin-expand": "^11.1.0",
69
- "@atlaskit/editor-plugin-extension": "^13.1.0",
69
+ "@atlaskit/editor-plugin-extension": "^13.2.0",
70
70
  "@atlaskit/editor-plugin-feature-flags": "^9.0.0",
71
- "@atlaskit/editor-plugin-find-replace": "^10.0.0",
71
+ "@atlaskit/editor-plugin-find-replace": "^10.1.0",
72
72
  "@atlaskit/editor-plugin-floating-toolbar": "^12.0.0",
73
73
  "@atlaskit/editor-plugin-focus": "^9.0.0",
74
74
  "@atlaskit/editor-plugin-fragment": "^10.0.0",
@@ -123,11 +123,12 @@
123
123
  "@atlaskit/editor-plugin-user-preferences": "^8.1.0",
124
124
  "@atlaskit/editor-plugin-width": "^11.0.0",
125
125
  "@atlaskit/platform-feature-flags": "^1.1.0",
126
- "@atlaskit/tmp-editor-statsig": "^77.0.0",
126
+ "@atlaskit/tmp-editor-statsig": "^77.2.0",
127
+ "@atlassian/editor-plugin-agent-managed-extension": "^0.1.0",
127
128
  "@babel/runtime": "^7.0.0"
128
129
  },
129
130
  "peerDependencies": {
130
- "@atlaskit/editor-common": "^114.20.0",
131
+ "@atlaskit/editor-common": "^114.25.0",
131
132
  "react": "^18.2.0",
132
133
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
133
134
  },